… because it’s simple, agnostic and an end-to-end solution.
OK, let’s slow down a bit and go through the above keywords step by step.
Over 150 frameworks, libraries and tools directly support JSON in over 30 (!) languages. This might well be because the entire specification (incl. ToC, all the legal stuff and contact information) is only 10 pages long, printed. To implement support for JSON in any given language, that is, parsing/mapping to native objects/types, is very very cheap and straight forward.
Just as HTTP is agnostic to the payload – you can transfer HTML over HTTP but also any other kind of representation incl. binary stuff – with JSON you have something really agnostic at hand. Want to encode a Key-Value list, JSON can do it. Need to represent any given tree in JSON – no problem. A graph serialised in JSON? Of course possible! I suppose this flexibility makes JSON attractive for a lot of different people, having a multitude of use cases in mind.
What I mean with this is that JSON is available and used throughout, from front-end to back-end:
- Front-end examples: jQuery, Dojo, etc.
- Back-end examples: MongoDB, CouchDB, elasticsearch, Node.js, etc.
OK, I reckon it is time to say: ‘Thank you, Doug!’ in case you haven’t done it today, yet😉