-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
2,056
-
(copied to CRM)
Hello,
If the JSON file contains a document with an invalid JSON document, the import will fail and it won't skip it to continue. It think it is a good default behaviour, but there are some cases where it is ok to skip the malformed document and continue the import.
For example:
{"_id":{"$oid":"5d0262232553044cf43488fc"},"name":"\"} {"_id":{"$oid":"5d0262232553044cf43488fd"},"name":"hehe"}
It fails with:
Failed: error processing document #1: invalid character '\n' in string literal
This ticket is to ask for a mongoimport command line option that allows the tool to skip "invalid character" errors and continue with the next documents. Of course, those errors should be logged anyway.