Parse extended JSON in the raw BSON serializer

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Our raw BSON serializer currently does not parse extended JSON into BSON. For example, the following code will produce BSON bytes that store a document with a nested document containing a "$regularExpression" key rather than a document with a regular expression value:

      let doc = doc! { "regex": { "$regularExpression": { "pattern": "a", "options": "b" } } };
      let bytes = bson::to_vec(&regex).unwrap();
      

      This is inconsistent with the behavior of the non-raw BSON serializer, which does parse extended JSON. We should update the raw serializer to be consistent with the non-raw serializer.

              Assignee:
              Unassigned
              Reporter:
              Isabel Atkinson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: