Right now we use JSON escaping rules for strings rather than CSV rules.
Proposal: Strings (and equivalent types like symbol) and numbers get printed directly in CSV format. Other types like objects or arrays get converted to JSON then run through the CSV escaper so they will be valid JSON strings after an import.
Questions:
Should Code be a String equivalent or JSON?
Should OID's be emited as regular hex strings or csv escaped ObjectID("abcde"). The later preserves the distinction between strings and OIDs, but it will make a terrible key if trying to share data with another DB.
- is depended on by
-
SERVER-2357 mongoimport should ignore trailing commas in CSV files
- Closed
- is duplicated by
-
SERVER-3180 CSV/TSV import split data on line breaker
- Closed
- is related to
-
SERVER-3936 Weird problem with mongoimport
- Closed
-
TOOLS-62 mongoimport doesn't support multiline string fields
- Closed
- related to
-
SERVER-2379 mongoimport + csv with commas in values: extraneous data
- Closed
-
SERVER-2634 mongoimport fails to import CSV when field value is a full stop "."
- Closed