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

Enums are incorrectly serialized using as_json #151

Conversation

wooly
Copy link

@wooly wooly commented Jul 17, 2023

It appears that enum attributes aren't properly being serialized using as_json.

I've attached a failing test case for it - I'd expect the configuration as json to convert back from integer to stringified-symbol of the enum key.

@DmitryTsepelev
Copy link
Owner

Hey! I build a quick prototype, will try to complete this week

@wooly
Copy link
Author

wooly commented Jul 17, 2023

@DmitryTsepelev you’re a legend, let me know if I can help 👍

@DmitryTsepelev
Copy link
Owner

@wooly here it is #153 — could you please try it before I merge it in? Please note that you will need to explicitly turn it on, cause I won't make a 3.0.0 after 2.0.1 🙂

@wooly
Copy link
Author

wooly commented Jul 19, 2023

@DmitryTsepelev thanks heaps, this is working well! Noted RE explicitly turning it on, that's fine.

@wooly wooly deleted the topic/enum-no-as-json branch July 20, 2023 19:19
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

Successfully merging this pull request may close these issues.

2 participants