JSON only supports strings as dict keys, and this casting is done automatically. It would be good to have some way to specify a "key loader" type, perhaps in the type annotation of a SerializableDataclass which allows the user to specify what the keys of a dict should be cast to when loading it from JSON.
JSON only supports strings as dict keys, and this casting is done automatically. It would be good to have some way to specify a "key loader" type, perhaps in the type annotation of a
SerializableDataclasswhich allows the user to specify what the keys of a dict should be cast to when loading it from JSON.