Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make serializable decorator for Enum #5

Open
drhagen opened this issue May 4, 2023 · 0 comments
Open

Make serializable decorator for Enum #5

drhagen opened this issue May 4, 2023 · 0 comments

Comments

@drhagen
Copy link
Owner

drhagen commented May 4, 2023

It is straightforward to make Enums serializable. It would be very similar to a serializer(Literal[...]) except that the data would get serialized into a proper member of the enum. I would always use the name of the enum as the serialized value, but others may want to use the enum value. For that reason, it may be better to add this feature as @enum_serializable so that a flag could be added in the future to use the enum values instead of the name as the serialized data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant