-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.1.0
-
Component/s: Tools
-
None
Problem:
mongoimport does not support JSON with the ISODate representation, for example
It will fail with the following error
Mon Apr 9 09:06:09 Assertion: 10340:Failure parsing JSON string near: , "ts" : I
Solution:
Extend monogimport to support ISODate
Test case:
> db.foo.save(
{name:"bob", ts: ISODate("2012-04-09")});
> db.foo.find(
{name:"bob"});
{ "_id" : ObjectId("4f82992047a6783d6427f207"), "name" : "bob", "ts" : ISODate("2012-04-09T00:00:00Z") }> exit
cut & paste that object into a file , e.g. tmp/3/json
$ mongoimport -d test -c foo /tmp/3.json
- related to
-
SERVER-5675 mongoimport should support all (extended) json formats
- Closed