When you're dealing with complex data, JSON isn't very fun, but XML is still worse.
This annotation structure not only lets us transform the xml into HTML that resembles the physical book via CSS, but also lets us search the content with awareness of what the content is. Simple example, if a search term appears in a title give it more weight.
When a book is done the XML goes off to a printer to become a book, AND into our XML database. A nice feature of which is a lot of our content is in the DB as XML, you ask for a book page and the DB returns the HTML for the page, backend just forwards that HTML to the browser which displays it. ZERO parsing/transformation anywhere once the DB sends it! Just fling the payload at the browser. Super cool at times.
Anyway we all work with these formats differently, some of us never touch the json and xml, some of us only tweak values in config files. Those of us who work with it like that, the only differences between XML and JSON are "how nice are the serialization apis and how fast are they? how big is the payload?"
But when working WITH the format directly there can be more meaningful differences. And the tools that actually exist for the things you are doing may push you towards one format or the other, even if in principle it wouldn't have really mattered.
note: I keep mixing tenses here but this was all in the past, we got bought, don't do any of this anymore!
To clarify: no, I do not believe that JSON is universally better than XML. I believe JSON is better than XML for the majority of use cases where people are currently using JSON today, esp. as an interchange format.
JSON's spec is simpler, and the data are more compact. There are a ton of extremely fast parsers, as well as stream parsers. Many languages support JSON natively making it extra easy for interoperability.
Pretty sure that was in response to you making assumptions about their experience, not as an answer to the question about what specifically makes them think that, which you only asked afterwards.
This whole chain of comments is a good example of why responding with a dismissive short comment isn't a good idea, even if it feels good to send in the moment.
<roof>
<true>
1
</true>
<false>
1
</false>
</roof>
(Normally, exactly one of either the <true> or <false> tags should have a "1", and the other a "0". Normally.)(The really horrible thing was that there were … I don't want to call them "reasons" because that's a strong word, so let's say "cause and effect" that led to this format… and once you came to know them, you "understood", in a sort of horrible sense, the format. But give me a JSON bool any day over it.)
https://www.w3.org/TR/xmlschema-2/#built-in-primitive-dataty...
If you are somehow in an environment where you are working with data nominally encoded according to XML spec, yet unable to leverage any other parts of the standard XML ecosystem, then I would certainly agree that XML is a bad choice!
Light-years away from zero-copy serialization formats.
See https://en.wikipedia.org/wiki/Comparison_of_data-serializati...
Random example: https://google.github.io/flatbuffers/md__benchmarks.html
Speed is not everything: being able to self-describe data structures (without the data) enables generation of parsers, documentation and tests.
Streaming support also matters.
(I'm certain one can find a slow JSON serializer out performed by a fast XML serializer, but that's not the point.)