JSON2CSV icon indicating copy to clipboard operation
JSON2CSV copied to clipboard

json2csv

Open sonomilko opened this issue 11 years ago • 4 comments

hello world :) i need to convert json google stream data to csv (or xml). here a sample of data: https://docs.google.com/spreadsheets/d/16TlohLsP0kv-cfoxnDO128ZcS_67rzObzAY4F6gorwg/gviz/tq

at the moment i'm able to create a script which download data to my pc, remove non-json info from header&footer of the stream and convert-it to csv, but the conversion isn't really orthodox :-) (the conversion need all the fields must be populated, not "null" value). i've noticed that exist a json2csv php script but really don't know how to use it. i've tryed to run the php script putting the json2csv.php inside www folder of my wamp installation: don't run.

could you show me a solution ? thx

sonomilko avatar Apr 17 '14 09:04 sonomilko

This json is not flat.

peterchibunna avatar Apr 11 '15 20:04 peterchibunna

how to save csv file in my current directory where i m having this script

dracesh avatar Nov 23 '16 08:11 dracesh

I tried to run the php files and convert my json files, the .csv i get is different and I did not make any changes to your code, but result seems different compared to the application in your blog at http://www.danmandle.com/blog/json-to-csv-conversion-utility/. Same Json file conducted the test, but the result it different.

I got this from the php files during testing: image

I got this from your blog application: image

I am still a beginner in php, hopefully i can get some guidance.

felixyong92 avatar Jul 31 '18 18:07 felixyong92

@felixyong92 Looks like instead of using commas, your CSV is outputting semicolons.

danmandle avatar Jul 31 '18 19:07 danmandle