Came across this article in my Google* alerts today: “XML Found To Be Just As Fast As JSON” which describes a paper written by one of my colleagues here at MarkLogic, David Lee — a paper which “documents an experiment where he pit XML against JSON in almost 1,200 tests covering 33 different documents across multiple Web browsers and operating systems. The results may surprise you.”

Naturally I had to follow the link to the original paper, which is here: “Fat Markup: Trimming the Myth one calorie at a time” (from this month’s Balisage conference).  Here’s the abstract so you can decide for yourself it it’s worth clicking over for a full read:

We all know that XML is “fat” and JSON is the “thinner”, “faster”, “smaller”, “better” markup. We know this to be true because we’ve been told it over and over. It’s “obvious” and “inherently true” because XML has redundant end tags, namespaces, entities and other extra “pounds of fat” that JSON doesn’t have. But where is the science supporting this? What are the facts and what is myth? When people make design and architecture decisions it should be supported by facts not speculation. In this paper I show the results of an ongoing series of real world tests of Markup performance in browsers across a wide variety of devices, browsers and operating systems and attempt to quantify markup performance with experimental results and maybe trim the fat myth one calorie at a time.

David lays out the myth, the experiment, the results, problems and issues, and provides some conclusions including specific suggestions for architects and developers. Now, as a marketer – vs an engineer – I can’t say I understand everything he has written, but I will definitely be pointing people to this article whenever a JSON vs XML discussion comes up!

This website uses cookies.

By continuing to use this website you are giving consent to cookies being used in accordance with the Privacy Policy.