jehiah / json2csv

command line tool to convert json to csv
MIT License
801 stars 94 forks source link

Properly handle numbers, escape codes, and nulls #3

Closed thinkjson closed 12 years ago

thinkjson commented 12 years ago

In this pull request, I use the already escaped JSON strings, and just account for the special case for nulls. As an added benefit, numbers also come across correctly now. Closes #2

thinkjson commented 12 years ago

Ah, it works for everything except the original use case, which is quotes. The proper escaping of quotes is "" not \" per http://en.wikipedia.org/wiki/Comma-separated_values. I'll see if I can gracefully handle this case as well.