[COMPASS-3384] As a developer I need Compass to accept mongo shell mode JSON for import, including ObjectId Created: 12/Jan/19  Updated: 16/Aug/19  Resolved: 16/Aug/19

Status: Closed
Project: Compass
Component/s: Compass
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Brian Blevins Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2019-01-12-09-28-46-407.png     File test_folder_data.json    
Issue Links:
Problem/Incident
causes COMPASS-3829 Import JSON Closed
Related
is related to COMPASS-3185 As a frequent user, I need to import ... Closed

 Description   

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.



 Comments   
Comment by Massimiliano Marcon [ 16/Aug/19 ]

Triaged and will be done in COMPASS-3829

Comment by Brian Blevins [ 12/Jan/19 ]

Documents spread across multiple lines are also common.

Generated at Wed Feb 07 22:33:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.