-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
(copied to CRM)
When trying to mongoimport a json file that contains an ISODate field, the import will fail from a 4.2.0rc2 mongoimport.
The same file will succeed using 4.0.10, 3.6.13, 3.4.21.
λ 4.0.10\mongoimport.exe -d test -c test1 --type json --file date-isodate.json 2019-07-04T15:14:38.167-0400 connected to: localhost 2019-07-04T15:14:38.184-0400 imported 1 document λ 4.0.10\mongoimport.exe -d test -c test2 --type json --file date-$date.json 2019-07-04T15:14:49.767-0400 connected to: localhost 2019-07-04T15:14:49.781-0400 imported 1 document λ 4.2.0rc2\mongoimport.exe -d test -c test3 --type json --file date-isodate.json 2019-07-04T15:15:47.474-0400 connected to: mongodb://localhost/ 2019-07-04T15:15:47.777-0400 Failed: invalid JSON input. Position: 23. Character: I 2019-07-04T15:15:47.778-0400 0 document(s) imported successfully. 0 document(s) failed to import. λ 4.2.0rc2\mongoimport.exe -d test -c test4 --type json --file date-$date.json 2019-07-04T15:15:54.554-0400 connected to: mongodb://localhost/ 2019-07-04T15:15:54.868-0400 1 document(s) imported successfully. 0 document(s) failed to import.
The second test replaces ISODate with "$date": "YYYY-MM-DDTHH:MM:SS.nnnZ" and succeeds in 4.2.0rc2.
Tested on 4.2.0rc2 for Windows. Test files attached.
- related to
-
TOOLS-1610 implement the extended json spec in import/export
- Closed