zemirco / json2csv

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

Should throw error if parse gets a string instead of json #510

Open knownasilya opened 3 years ago

knownasilya commented 3 years ago

See https://github.com/zemirco/json2csv/issues/509 for context.

A helpful error would save people and us time.

juanjoDiaz commented 3 years ago

It already throws an error.

It only doesn't if you use the sync API and pass the fields manually. I guess that that's because you might have a JSON array that mixes objects and string.