While exploring bring up of using `orjson`, exposed an interesting flaw. The stdlib `json` encoder seems to be ok with coercing a `str` from an `Enum`(specifically, a `Class[str, Enum]`). The `orjson` encoder does not like that this is a class and not a proper `str` per spec. Using the `.value` of the enum as the key for the dict produced while answering a `GET` admin request for experimental features seems to fix this.
2 lines
109 B
Plaintext
2 lines
109 B
Plaintext
Use the `Enum`'s value for the dictionary key when responding to an admin request for experimental features.
|