gonik — 2013-03-15T22:24:01-04:00 — #1
Long time no see. Well, for my latest project I have read a pretty big .json file (~18 MB) to an array using json_decode(). Not only it's big but also pretty nested (around 8 levels).
For obvious reasons if I try var_dump() the browser freezes for quite some time, but eventually displays the dump.
I have to do this to another 10 or so (big) files. Is it possible to save the array to a text file instead of displaying it to the browser? I want them saved for future reference as I develop the app.
Thanks in advance for your time.
cpradio — 2013-03-15T22:27:24-04:00 — #2
json already is a file... I'd personally download a tool such as jsonviewer and use that to view your files so you don't have to do a var_dump on an already readable file.
gonik — 2013-03-16T08:37:54-04:00 — #3
hey cool! i didn't know a tool like that existed. I tried working from the .json directly but it's pretty messed up.
But that tool is exactly what i need! Thanx cpradio!