Hacker News new | ask | show | jobs
by nommm-nommm 3504 days ago
Why would a JSON file be GBs in size? I think that's the more interesting question.
2 comments

Because it has GBs of data? There's no size limit on JSON.
I think nom-nom is trying to imply that if you're passing GBs of Json around, "human readability" isn't probably a concern. Therefore you could go for an efficient binary format.
JSON isn't just about human readability, it's about being a 'good enough' standard for data exchange. What binary format would you use that people could parse as reliably as JSON?
In case your question wasn't rhetorical, I believe MessagePack is the leading schema-less binary serialization format (which does not contradict your point as it is still less ubiquitous than JSON).
"Why would a JSON file be GBs in size?"

Maps. [0] Geo-cordinate data can consist of tens of thousands of data points. For example, think of a two dimensional space with a co-ordinate grid at regular intervals representing a 20km x 20km city. Then imagine creating an outline of a city road network. Each point a LAT/LON co-ordinate. Then imagine placing thematic data such as known traffic hot spots.

Lots of data.

[0] The author has this post in his blog ~ https://peteris.rocks/blog/openstreetmap-city-blocks-as-geoj...

Thank you! I was really racking my brain trying to think of a use case that produced that much JSON.