Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-670

EJSON output for explain plan

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.12.0
    • Affects Version/s: None
    • Component/s: Shell API
    • Labels:
      None
    • 1
    • Needed
    • Hide

      EJSON is now available as a global object in the shell, i.e. EJSON.parse, EJSON.stringify, EJSON.serialize and EJSON.deserialize are available with the semantics they have in the bson package: https://github.com/mongodb/js-bson#ejson

      Show
      EJSON is now available as a global object in the shell, i.e. EJSON.parse , EJSON.stringify , EJSON.serialize and EJSON.deserialize are available with the semantics they have in the bson package: https://github.com/mongodb/js-bson#ejson

      Technical support is currently parsing the output of `mongo` explain plans. With mongosh we would cause a breaking change for them (the output would not be proper ejson due to missing quotes).

      Their parser seems to accept ejson as input. We may want to either provide the same output as `mongo` for `.explain` or provide a convenient way to output ejson.

      Note: the explain is usually run by customer and the output is then sent to TS.

      From: https://mongodb.slack.com/archives/CUHC9R8J0/p1617684560022700

            Assignee:
            Unassigned Unassigned
            Reporter:
            maurizio.casimirri@mongodb.com Maurizio Casimirri
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: