You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deserialization to succeed and for others to contain the "unexpected_field".
Actual behavior
thread 'main' panicked at src/main.rs:16:50:
called Result::unwrap() on an Err value: invalid type: newtype struct, expected a valid json at line 5 column 4
sonic-rs version:
latest (0.3.13)
Environment:
macos
The text was updated successfully, but these errors were encountered:
Describe the bug
If a struct contains a field annotated with
#[serde(flatten)]
, it cannot be deserialized by sonic.To Reproduce
Cargo.toml
main.rs
Expected behavior
Deserialization to succeed and for
others
to contain the "unexpected_field
".Actual behavior
thread 'main' panicked at src/main.rs:16:50:
called
Result::unwrap()
on anErr
value: invalid type: newtype struct, expected a valid json at line 5 column 4sonic-rs version:
latest (0.3.13)
Environment:
macos
The text was updated successfully, but these errors were encountered: