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

FYI: serde supports tagged JSON representations of enums #2

Open
sxlijin opened this issue May 20, 2024 · 1 comment
Open

FYI: serde supports tagged JSON representations of enums #2

sxlijin opened this issue May 20, 2024 · 1 comment

Comments

@sxlijin
Copy link

sxlijin commented May 20, 2024

Was reading through your code as inspiration for a library I'm writing, and wanted to let you know that serde supports tagged representations: https://serde.rs/enum-representations.html

@mochi-neko
Copy link
Owner

mochi-neko commented May 21, 2024

@sxlijin

Thank you for providing helpful information!

#[serde(untagged)] seems convenient.

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

2 participants