Commit Graph

6 Commits

Author SHA1 Message Date
Vladimir Rutsky
3216c8de03 output all non-binary fields as unicode strings and binary fields as MongoDB extended JSON binary field
Now mdb-exportjson output can be successfully imported into MongoDB with
mongoimport even if:

 * columns have unicode names
 * there are fields of binary types (e.g. OLE)
2015-02-19 21:05:49 +03:00
Vladimir Rutsky
bc1483429d use JSON unicode escape \uUUUU instead \xXX for [0, 0x20) characters
JSON specification doesn't allow `\xXX` escape sequences
2015-02-19 21:05:49 +03:00
Vladimir Rutsky
47c0698609 treat only characters with codes in [0, 0x20) range as non-ascii 2015-02-19 21:05:49 +03:00
Vladimir Rutsky
d8cba08493 fix delimiter outputting when some fields values are missing 2015-02-19 20:51:57 +03:00
Vladimir Rutsky
b842480cd5 don't drop non-ascii characters by default
This corresponds to `-A` option description.
2015-02-19 20:48:44 +03:00
Ugo Di Girolamo
5057419da9 Add new binary util - mdb-exportjson
A new binary util for exporting mdb rows as json lines.
This is very useful for importing mdb data to mongo in combination with mongoimport.

The code is vastly similar to the mdb-export but there are enough dissimilarities and disagreement
about flag values that I thought a separate util is warranted.
2014-05-21 22:35:06 -04:00