-
-
Notifications
You must be signed in to change notification settings - Fork 784
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
Flattening an Enum doesn't "consume" the fields #2200
Comments
A pretty fatal issue with this is that round trip deserialization->serialization->deserialize does not work. Deserializing creates the key in both the enum and the map. This key appears twice in the serialization (at least using |
xJonathanLEI
added a commit
to xJonathanLEI/starknet-jsonrpc-codegen
that referenced
this issue
Apr 2, 2024
Types with nested flatten fields don't work with `deny_unknown_fields` due to an upstream `serde` bug: serde-rs/serde#2200
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is a minimal example:
Which prints:
This behavior differs from flattening other types, such as structs. For example:
Which prints:
The text was updated successfully, but these errors were encountered: