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

support for default #5

Open
Licenser opened this issue Feb 11, 2021 · 2 comments
Open

support for default #5

Licenser opened this issue Feb 11, 2021 · 2 comments

Comments

@Licenser
Copy link
Member

add #[serde(default)] as supported modifier

@ByteZ1337
Copy link

ByteZ1337 commented Mar 11, 2024

I'm currently implementing this here, and I was wondering how/if unnamed structs and enum variants should be handled? Given that deserialization currently only supports newtype unnamed structs, should the implementation only focus on named structs and panic when the attribute is used in other cases for the time being?
I'm also unsure what json would even need to be deserialized to reach a case where defaults for newtypes are needed.

@Licenser
Copy link
Member Author

Heya first of all thank you for looking into this!

And yes, following the same model for unsupported types is totally fair :)

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