Skip to content

custom key types when saving dict #28

@mivanit

Description

@mivanit

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions