-
Notifications
You must be signed in to change notification settings - Fork 75
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
Can't deserialize some cases when using #[serde(flatten)] #14
Comments
Nevermind, this appears to be a problem higher up: serde-rs/serde#1183 and nox/serde_urlencoded#33. Closing. |
Happened to come across this again today, and proposed this workaround. Leaving here for future interest. |
Very helpful--thank you! I wonder if it isn't better to suggest the |
Thanks for the suggestion, yes that looks like a better approach! |
Hi! When using serde's relatively new
#[serde(flatten)]
feature, nested values are sometimes not parsed correctly. It seems like values that have to be parsed from strings (e.g., numbers) are failing; it seems like they are deserialized too early into a string, rather than the final value type.For example, here is a failing test
This panics with
"invalid type: string \"45\", expected u32"
.Have you encountered this? Any thoughts or workarounds?
The text was updated successfully, but these errors were encountered: