We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e13c774 commit cde0c54Copy full SHA for cde0c54
src/bson.rs
@@ -379,10 +379,12 @@ impl Bson {
379
}
380
Bson::Double(v) => json!(v),
381
Bson::String(v) => json!(v),
382
- Bson::Array(v) => json!(v),
383
- Bson::Document(v) => {
384
- Value::Object(v.into_iter().map(|(k, v)| (k, Value::from(v))).collect())
385
- }
+ Bson::Array(v) => Value::Array(v.into_iter().map(Bson::into_relaxed_extjson).collect()),
+ Bson::Document(v) => Value::Object(
+ v.into_iter()
+ .map(|(k, v)| (k, v.into_relaxed_extjson()))
386
+ .collect(),
387
+ ),
388
Bson::Boolean(v) => json!(v),
389
Bson::Null => Value::Null,
390
Bson::RegularExpression(Regex { pattern, options }) => {
0 commit comments