Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's true, but the JSON data is sent over the wire with gzip compression. All those repeated names compress out very nicely.

CSV is still probably more compact than JSON even when compressed, but the difference isn't nearly as much as you'd expect from the raw textual version.

Of course it gets expanded back to the full text in the browser, but that gets parsed and discarded right away.

When I read CSV in JavaScript, for convenience I usually end up converting it to in-memory objects that resemble the JSON object that I would have downloaded otherwise. So at least in that case there isn't much difference in memory use either.



Also browsers are much more likely to be able to optimize the parsing of JSON back into a DOM than they are to be able to optimize the JS that would be used to parse the CSV.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: