Skip to content

Why do we export JSON and not XML?


JSON is data centered, XML is document centered.

We are trying to get away from the paradigm where guidelines are documents and towards a state where guidelines are mere containers of information. And the information they contain is data that can be exchanged, recognized and used together with the rest of the world.
If you want exported content from the MAGIC platform, we are pretty sure you want JSON, not XML.
If you disagree, contact us for a chat.

Quote from http://www.json.org/:

"Extensible Markup Language (XML) is a text format derived from Standard Generalized Markup Language (SGML). Compared to SGML, XML is simple. HyperText Markup Language (HTML), by comparison, is even simpler. Even so, a good reference book on HTML is an inch thick. This is because the formatting and structuring of documents is a complicated business.

Most of the excitement around XML is around a new role as an interchangeable data serialization format. XML provides two enormous advantages as a data representation language:

It is text-based.
It is position-independent.
These together encouraged a higher level of application-independence than other data-interchange formats. The fact that XML was already a W3C standard meant that there wasn't much left to fight about (or so it seemed).

Unfortunately, XML is not well suited to data-interchange, much as a wrench is not well-suited to driving nails. It carries a lot of baggage, and it doesn't match the data model of most programming languages. When most programmers saw XML for the first time, they were shocked at how ugly and inefficient it was. It turns out that that first reaction was the correct one. There is another text notation that has all of the advantages of XML, but is much better suited to data-interchange. That notation is JavaScript Object Notation (JSON).

The most informed opinions on XML (see for example xmlsuck.org) suggest that XML has big problems as a data-interchange format, but the disadvantages are compensated for by the benefits of interoperability and openness. JSON promises the same benefits of interoperability and openness, but without the disadvantages."

Links to full text

Last Updated: 26 January 2024

Feedback and Knowledge Base