Worse is better: JSON versus XML

Mark Seemann ยท rss ยท 2026-07-06 source โ†— Reader ๐Ÿ–ฅ๏ธ

Changeability & OptionalityModularity & CouplingSoftware Design FundamentalsWorse Is Better
Despite JSON's popularity, XML is the superior data-interchange format in most respects โ€” because its mature ecosystem of standards (schemas, versioning, querying, streaming, even sum types) delivers real capability that JSON only reinvents piecemeal, while JSON's supposed advantages (informality, size, readability) are illusory, marginal, or equally achievable in XML โ€” making JSON another case of 'worse is better'.

practical ยท Argumentative opinion essay (contrarian technical advocacy), part of the author's 'Worse is better' series โ€” The article's END is practical โ€” to change which data-interchange format the reader reaches for (prefer XML for interoperability; use JSON pragmatically). Its BODY, however, is a chain of evaluative-theoretical judgments ('XML is superior in most respects'). The structure is a sequence of objection-and-rebuttal: Seemann steel-mans each pro-JSON argument (ceremony, size, readability) and defuses it. Notably, the author's own stated practice (he'd 'pragmatically choose JSON in lots of cases') diverges from his thesis โ€” 'worse is better' operating on the author himself.

Structure

PartRole
Series frame + thesisOpens with the bolded claim 'JSON is not a good data-interchange format', locates the piece in the 'Worse is better' series, and invokes the VHS-vs-Betamax analogy to prime the reader that popularity does not track technical merit.
Disentangling XML from SOAP/WS-*/XSLTPre-empts the reflexive anti-XML reaction by arguing the loathed enterprise standards were awkward on their own, not because of XML โ€” separating the format from its historical abusers.
Lightweight XMLRebuts the 'XML = ceremony' objection: XML can be as informal as JSON (no mandatory schema, namespace, or declaration) and supports gradual enhancement, adding formality only when needed. Notes the irony of JSON Schema's existence.
Sweet spots (interoperability + config)Makes the positive case: XML's ideal domain is interoperability because of machine-readable schemas (invoking Alexis King on specification-without-static-types and Hyrum's law on implicit contracts), backed by a mature standards ecosystem โ€” 'why reinvent the wheel?' Then argues JSON is a poor config format (no standard comments), while conceding neither format is ideal for config.
Readability concessionConcedes XML is less readable but argues the gap is marginal given syntax colouring and schema-aware editors.
Where JSON shinesGrants JSON's legitimate wins โ€” SPAs/BFFs (JavaScript-native) and the pragmatic default choice โ€” noting the etymological irony that AJAX's X once stood for XML.
Size objectionAddresses the strongest pro-JSON argument (verbosity) with a worked example, then defuses it: the size difference rarely dominates over latency/block-size, and when performance truly matters, JSON is too big too.
ConclusionRestates that XML is superior in most aspects thanks to a rich, mature standards ecosystem (including sum types), and closes on the recurring rhetorical thrust: why reinvent the wheel?

Key terms

Propositions

Arguments

XML is a superior data-interchange format to JSON in most respects, and should be preferred for interoperability. strength: medium
Explicit premises:
Implicit premises:
Inferences:
JSON is a poor configuration-file format, and XML is the better (though still imperfect) choice there. strength: medium
Explicit premises:
Implicit premises:
Inferences:
JSON's smaller size is not a decisive advantage over XML. strength: low
Explicit premises:
Implicit premises:
Inferences:

Narratives

Questions addressed

Gaps

Related documents