Earlier quoted context omitted.
What's wrong with XML?
Im sure there are better answers here but my main issue is that attributes and child elements offer duplicate functionality. You could have 4 5 or you could have . There is often no consistency within a single spec over how this should be done let alone between different specs. JSON feels much more logical to me as well as being a whole lot simpler. If only it supported comments.
As far as I know, the original intention of the language designers was that attributes are for metadata and sub-elements are for data. For non-trivial schemas that form part of a data contract between systems or organisations, and/or are expected to evolve over time, I tend to stick to this approach. It results in more verbose data, but in my experience thats almost never a problem and can be an advantage if I have to drop into the data and actually read it.
For smaller-scale and internal schemas (e.g. internal tool configs) the terseness of e.g. definitely wins out over design purity for me. JSON would be equally good for this.
I work on enterprise integration and messaging stuff and I deal with a lot of XML data every day. JSON has its uses (particularly when you control both ends of the serialisation pipeline) but for me XML has a lot of advantages.