Fun fact: XML schema declarations are themselves XML documents, and there exists an XSD describing allowable XSDs. https://www.w3.org/2001/XMLSchema.xsd
Fun fact: XML schema declarations are themselves XML documents, and there exists an XSD describing allowable XSDs. https://www.w3.org/2001/XMLSchema.xsd
Nobody contests XML's capability. It was unpleasant to write and read.
XML is ugly, but complicated JSON isn't much better IMO. It has an only slightly less human-unfriendly syntax: Why do I have to use double quotes on keys? Why are there no comments? Then come things like schemas, queries, and transformations: XSD, XPath, and XSLT are very powerful tools. Their implementation sucks, but it's arguably better than people coming up with their own half-documented solution whenever they need something XSD/XPath/XSLT provides.
The problem is usages that grow in their need for power over time, with high switching costs. Instead of choosing, they add pressure to XMLify the JSON ecosystem.
JSON's doom seems distant but inevitable, but it will instead be defeated by the rise of yet another format.
Here's the answer: https://plus.google.com/+DouglasCrockfordEsq/posts/RK8qyGVaG...
Not sure if I agree with it or not, nevertheless that was the reasoning.
(Automatically fetching XSDs e.g. sounds nice in practice, until you realize that it means your server will make HTTP requests to user-supplied URLs, so most parsers come with an option to disable it, which may or may not break documents relying on it.)
> I removed comments from JSON because I saw people were using them to hold parsing directives, a practice which would have destroyed interoperability. I know that the lack of comments makes some people sad, but it shouldn't.
via https://plus.google.com/+DouglasCrockfordEsq/posts/RK8qyGVaG...
Double quotes everywhere are more annoying to read than end tags. If we're going to invent nonstandard formats, why not remove the redundant tag name in the XML end tag. Problem solved.
https://github.com/rendaw/luxem
A perhaps lightly more rigorous specification:
https://github.com/Rendaw/luxemj/blob/master/src/main/resour...
It allows optional quotes and comments, plus trailing "," and element type specifications. I think it's easier to read and hand-write, as well as write a parser/generator.
Comments wouldn't be usefull (mostly) for data sent on the wire --and JSON is quite good for that-- but for configuration files, they're indispensable. INI (like git's) is way better of a configuration format than JSON. Easier both to read and to write.
Python provides programmatic access to docstrings, for example, and it has many valid uses.
Despite JSON's shortcomings, the developer community found it on the whole more pleasant to work with.
It's the same argument that Lisp users make. The two are more expressive, more capable, more safe. It's also very dense and intimidating.
You can come up with all the justifications you'd like. It won't win the hearts of developers.