zemirco / json2csv

Convert json to csv with column titles
http://zemirco.github.io/json2csv
MIT License
2.72k stars 363 forks source link

'\\' in value not escaped properly #202

Closed rodogu closed 6 years ago

rodogu commented 7 years ago

I noticed that if the value has something like"cheese \\", it gets convert as "cheese "" in the csv, which breaks the formatting.

For example:

{
  "cheese":"gouda",
  "bacon":"canadian\\"
}

will generate this

"bacon","cheese"
"canadian"","gouda"
juanjoDiaz commented 6 years ago

The latest version of json2csv prints:

"cheese","bacon"
"gouda","canadian\"

as expected. So this can be closed.