The last time I heard, there weren’t two JSON parsers that actually accepted the same language, so I’m not sure there’s an existence proof to back this statement up. :-)
XML is more complicated, but if we want to compare apples to apples, it’s only due to the white space sensitivity. (dtd, schema, etc don’t have analogous technologies in the json world, and at least xpath is a standard, unlike jq).
You're supposed to use an off-the-shelf XML/JSON parser, not write it yourself.
That's basically a description of ActivityPub that wraps HTML in JSON!
<body> markdown text </body>
And ship some js to convert to html?XML was a hype in 1999, when XMPP has been invented and JSON was a hype fifteen years later. When people invent protocols they just use what is trendy in the moment.
Check this active member of the community. Also folks on this very page claim how xml consumes much more resources
Coming from .NET, I do not care using JSON or XML, because the APIs System.Xml.Linq, Newtonsoft.Json and the upcoming System.Text.Json are a joy to use. I think the lack of good native representation of XML in JavaScript made it a unwanted choice.
Regards SOAP I tend to agree to you. Beyond the Basic profile it was a hassle to interop.
This could not be more false. JavaScript is built around the DOM. You can parse XML with DOMParser and query it with the same interfaces that you build your UI with. The X in AJAX is XML. The "good native representation" of XML in JavaScript is the very core data structure that JavaScript was designed to interact with.
XML is not popular because it's complex. Escaping is hard. XML bombs make it unusable in its raw form.
Fundamentally, XML doesn't give you data structures that look like the ones you use in your application logic. You have to transform your data into something that makes sense in XML, then transform it back. With JSON (and other formats) the data structures that you're given are present in almost every programming language. You don't need to model your data differently for transit or storage than you do in your application logic.
Average Joe Dev does not reach the impedance mismatch you mention correctly.
The whole XML hate thing is symptomatical for the staged this-vs-that discussion we endure in today's forums.
I guess there are those document representation schemes that everybody hates on, and those that nobody uses ;)
[1]: https://en.wikipedia.org/wiki/React_(JavaScript_library)#JSX
I agree with the rest though.