-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: 2.0.0, 2.1.0
-
Component/s: None
-
None
#[serde(flatten)] is implemented by internally buffering the visited data. Due to a bug / limitation in serde, the deserializer used to perform this buffering disrupts deserializer specific details, such as whether it's human readable or not (see https://github.com/serde-rs/serde/issues/1183). This can cause types that change their serialization behavior depending on the human readability to fail to round trip properly.
Originally filed on GH: https://github.com/mongodb/mongo-rust-driver/issues/530