3 ms·
JSON won because Javascript natively supports it, and because once the web assimilated everything, everything else had to support it.
by krapp 5y ago
JSON won because Javascript natively supports it, and because once the web assimilated everything, everything else had to support it.
- konart 5y agoJSON won because it can be easily processed by a human being
- chopin 5y agoYou can't comment in JSON which I don't like (to put it mildly). Any real human readable format should support comments.
- konart 5y agovalid point.
- speed_spread 5y agoThat's just a matter of what you've been exposed to. While XML will always be a little more verbose than JSON, a well-designed XML document format can be much easier to read than a poorly defined JSON one. Plus, chances are that good XML also specifies a schema, which can be used by editors and tools to help you make sense of the content and rules governing it. JSON has a few schema mechanisms, but they're not integrated into the standard and thus much less supported by tooling.
- pydry 5y agoI'm no web historian but IIRC it actually supported XML first. Calling a backend required an XMLHttpRequest call. JSON could be parsed but by "executing" it (shudder). So, whatever reason JSON won it wasnt that.
- GoblinSlayer 5y agoIIRC execution of JSON was suggested as a parsing method, I thought it was actually a nice hack. What's the point to not reuse the javascript parser which is right there?
- crispyambulance 5y agoJSON "won" because people were sick of xml, it's turgid tooling, rampant xml-abuse (the horrid ws-* ecosystem), and they were annoyed with having to edit it by hand. That said, xml could have worked out fine if there had been sane management of it's evolution. But now the cat's out of the bag, and we got json, and the "named-to-be-a-loser" YAML.
- dkarl 5y agoThis is pretty much it, JSON won because it wasn't trying to deliver on all the promises XML made. We could see that it wasn't going down that dark path. It wasn't going to attract a community drunk on visions of their markup language solving every problem that complex systems have. Maybe someday that kind of ambition will lead to something great, but we needed a step back.