XML vs JSON Debate

This cluster revolves around comparisons between XML and JSON data formats, debating their respective strengths like schemas and self-documentation versus simplicity and verbosity, and discussing appropriate use cases.

➡️ Stable 0.6x Web Development
4,655
Comments
20
Years Active
5
Top Authors
#4849
Topic ID

Activity Over Time

2007
19
2008
63
2009
78
2010
196
2011
167
2012
154
2013
225
2014
254
2015
217
2016
321
2017
234
2018
239
2019
369
2020
331
2021
335
2022
221
2023
550
2024
260
2025
354
2026
70

Keywords

HAL XMPP PHP xmpp.org IMO XML SQL SOAP ORM YAML xml json format data schema schemas markup element language attributes

Sample Comments

LAC-Tech Jul 19, 2022 View on HN

What problem did XML solve that JSON is still trying to?

Jesse_Ray Mar 1, 2012 View on HN

XML may seem harder than JSON, until you actually try to work with the data. When you need to create an automated system that checks that data has a certain format, XML has support for schemas and there are many software tools for creating schemas, which is something that cannot be said of JSON. Likewise, searching for data is much easier when you have a standard like XPath. Something akin to XPath would be much harder to make for JSON, since it lacks native support for element attributes. When

jeez Jun 23, 2011 View on HN

why did XML happen at all? JSON looks like the obvious solution. :\

tannhaeuser Aug 18, 2019 View on HN

XML wasn't meant as replacement for JSON, but for HTML without vocabulary-specific parsing rules (eg. SGML DTDs).

quotemstr Jun 12, 2017 View on HN

XML has several advantages over JSON: it's much better at self-documentation and the schema validation tools are more powerful. Namespaces compose elegantly. XML has a bad reputation due to enterprise-y abuse of the technology, but that does't mean it's a fundamentally bad idea.

jimfuller Oct 28, 2013 View on HN

agree with your sentiments,I believe the issue that many people have with XML goes a bit deeper ... using XML means you are creating a bit of distance between yourself and the host programming language. XML stands alone, apart, that distance comes with costs in terms of ease of use (which could have been addressed by proper tooling), as well as many benefits.HTML may not be pleasant to write documents with and I would say exactly the same thing of json ... show me the equiv of a Word docum

drdaeman Dec 1, 2014 View on HN

XML and JSON are different data formats with different properties and different uses.Please, don't blame one and praise the other, just use what's appropriate. It's somehow like with data structures - say, one won't generally use a graph when he actually needs a set, right?Trying to stash data into a semantically inappropriate format leads to kludges, and I'd say some JSON-based formats (for example, HAL-JSON) feel like so. Obviously, it's the same (or, possib

manigandham Mar 13, 2022 View on HN

What are the many other things that use XML? And why would these be better with JSON?

Devasta Nov 1, 2025 View on HN

What about XML isn't modern? It's a far more capable format than JSON or anything else you can devise.

pathartl Apr 24, 2024 View on HN

Is JSON better for data? XML can be pretty powerful when used properly.