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
> cargo run
[…]
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("invalid type: newtype struct, expected any valid JSON value", line: 1, column: 11)', src/main.rs:19:57
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
It seems that if any struct field in the path to a
Box<RawValue>
is marked with#[serde(flatten)]
, deserialization always fails.In the example below,
Def
can deserialize a certain JSON string, but the structAbc
containing a single#[serde(flatten)]
Def
field fails.https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=a7a182c5711834ea12a847374eb08de5
Might have a similar root cause as #479, #545, #599 or #779.
The text was updated successfully, but these errors were encountered: