-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: BSON
-
None
-
Rust Drivers
-
Not Needed
-
This user PR adds a feature flag to the driver to enable UTF-8 lossy deserialization, which the user needs to read invalid data inserted by a different driver. Doing so via the BSON library is currently inconvenient because UTF-8 lossy deserialization can only be enabled by calling one of the from_*_utf8_lossy methods, which doesn't play nicely with the driver's serde integration. Instead of exposing the driver feature flag, we should add a new Utf8Lossy wrapper type that users can embed their data types in to enable lossy deserialization. This would be similar to the existing HumanReadable wrapper type.