Re:Ask HN: What are some of the most elegant codebases in yo...
by xkcd-sucks on Saturday June 17, 2023 @02:44PM
(#36373166)
Omg the python stdlib json / simplejson both refuse to support custom serializers for keys only, as an explicit design decision. It is justified as "JSON keys must be strings", but JSON values can only be string/float/book/null so it seems a bit arbitrary. Leads to annoying gymnastics if you want to enforce "strong typing" of keys with Enum/pydantic/etc.
[ Parent
| on HN ]
There are no comments on this comment yet.