Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2208

Introduce new API for Extended JSON spec 2.0 output

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.7.0
    • Affects Version/s: None
    • Component/s: json, libbson
    • Labels:
      None

      For CDRIVER-2128, bson_as_json() was changed to output relaxed JSON from the Extended JSON spec.

      This ticket aims to accomplish a few things:

      • Ensure bson_as_json() does not significantly change its output in 1.7.0.
      • Rename bson_as_extended_json() to bson_as_canonical_json(), which will output canonical JSON from the Extended JSON spec.
      • Create bson_as_relaxed_json() to output relaxed JSON from the Extended JSON spec.

      Keeping bson_as_json()'s output largely unchanged will ensure that we do not introduce a subtle BC break for users depending on the structure of its current output (based on MongoDB 3.4's extended JSON syntax). Down the line, we can look at deprecating bson_as_json() once MongoDB 3.6 is released and its tools/shell are updated to handle the new format (TOOLS-1610).

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: