Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-3384

As a developer I need Compass to accept mongo shell mode JSON for import, including ObjectId

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Compass
    • None

      Compass 1.16.3 exports documents in JSON using strict mode which is described under MongoDB Extended JSON.

      When importing JSON documents, Compass currently does not accept mongo shell JSON representations. Refer to the screenshot of the "Unexpected token O in JSON at position 69" error. This is the source JSON file that generated that error.

      {"dateTest":{"$date":{"$numberLong":"1552262400000"}},"objectIdTest":ObjectId("5c29e881d45e71235f7ad302"),"nullTest":null}

      {"dateTest":{"$date":{"$numberLong":"1552435200000"}},"objectIdTest":ObjectId("30a9a881d45e21235b7ad302"),"nullTest":null}

      In order for Compass to be more useful, it should accept either strict mode or mongo shell mode JSON on import of JSON files.

        1. image-2019-01-12-09-28-46-407.png
          image-2019-01-12-09-28-46-407.png
          93 kB
        2. test_folder_data.json
          0.2 kB

            Assignee:
            Unassigned Unassigned
            Reporter:
            brian.blevins@mongodb.com Brian Blevins
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: