rufuspollock-okfn / dataconverters

Python library and command line tool for converting data from one format to another
http://okfnlabs.org/dataconverters/
100 stars 33 forks source link

JSON -> CSV #96

Closed mattfullerton closed 10 years ago

mattfullerton commented 10 years ago

Does dataconverters do this? The website clearly implied for me 'yes'? I did pip install dataconverters, and then I get this error: ValueError: No support for reading file type application/json - support for csv or xls only at present

rufuspollock commented 10 years ago

Hmmm, i think the issue here would be the structure of your JSON - it would have to be very regular to work. Adding support for JSON => CSV would definitely be a good idea and very simple if not there atm.

mattfullerton commented 10 years ago

Hmmm, i think the issue here would be the structure of your JSON - it would have to be very regular to work. Of course, but then a more sensible error message would be helpful

Adding support for JSON => CSV would definitely be a good idea and very simple if not there atm. The website (http://okfnlabs.org/dataconverters/) provides conflicting info at the moment, starting by saying that json is supported (to/from) but then not listing it under Supported Formats.

Sorry for my rather blunt questioning, I haven't had time today to test simpler json, or only json output, or look at the code. And I think I'm not going to want a complete flattening of the json file anyway but rather a case-specific picking and choosing approach, so this time round dataconverters is probably not the tool for the job. Great tool though!