[SERVER-5675] mongoimport should support all (extended) json formats Created: 21/Apr/12  Updated: 11/Jul/16  Resolved: 19/Dec/12

Status: Closed
Project: Core Server
Component/s: Shell, Tools
Affects Version/s: None
Fix Version/s: 2.3.2

Type: Improvement Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Unassigned
Resolution: Done Votes: 3
Labels: mongoimport
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-5677 rewrite json parser Closed
Related
related to SERVER-6813 Shell support for Extended JSON Closed
is related to SERVER-5543 mongoimport should support ISODate() ... Closed
Participants:

 Description   

All of these formats, http://www.mongodb.org/display/DOCS/Mongo+Extended+JSON, and anything the shell prints should be supported via mongoimport.



 Comments   
Comment by Andreas Kohn [ 16/Mar/15 ]

SERVER-5543 was closed with a pointer to this one, and this one is also closed as fixed.

With mongoimport version 2.6.8 I do see however that the shell syntax for ISODate() is not supported, while ObjectId() seems to work just fine. Is this a regression in a later version?

For the record, the error I'm getting:

exception:BSON representation of supplied JSON is too large: code FailedToParse: FailedToParse: Bad characters in value: offset:827 of:{ [stripped private data], "published" : ISODate("2014-04-30T12:59:47.621Z") }

The offset points to the 'I' in ISODate. Using sed to replace ISODate("...") with {"$date": "..."} lets the import succeed.

Generated at Thu Feb 08 03:09:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.