-
-
Notifications
You must be signed in to change notification settings - Fork 777
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
Implement attribute to disallow deserialization of struct and struct variant with named fields from sequence #2639
base: master
Are you sure you want to change the base?
Conversation
Documentation probably needs to be added to https://github.com/serde-rs/serde-rs.github.io, anywhere else? |
I would think, that we should deny deserialization of maps from sequences (at least by default, but I prefer at all). It is responsibility of a deserializer to call the correct The important point that should be explicitly stressed is that this
Fortunately, map keys deserialized using internally created special So we need several fixes in various serde crates:
In the summary:
|
Some observations for crates from main serde page:
|
I created a new branch and PR which should implement this: #2640 But since this would be a breaking change, an attribute as solution for version 1 still makes sense in my opinion. One could maybe display a deprecation warning when |
This only has an effect on struct variants.
…eserialize_in_place
Fixes #1587