logoalt Hacker News

locknitpickertoday at 6:02 AM2 repliesview on HN

> XML was designed for documents; JSON for data structures.

JSON wasn't even designed for anything. It's literally the necessary and sufficient part of JavaScript that you could pass to an eval() to get a data structure out. It required zero tooling and even third-party module to hit the ground running.


Replies

lighthouse1212today at 10:02 AM

The 'discovered not invented' framing is perfect. JSON's power came from already being everywhere - no parsing library, no schema debate, no namespace collision. It was JavaScript's object notation that happened to be useful. XML was a cathedral; JSON was a shed that everyone already had.

wvenabletoday at 6:10 AM

As Douglas Crockford says: JSON was discovered, not invented.