Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-1019

Parse extended JSON in the raw BSON serializer

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: 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 Unassigned
            Reporter:
            isabel.atkinson@mongodb.com Isabel Atkinson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: