Your support for our advertisers helps cover the cost of hosting, research, and maintenance of this FAQ

The XML FAQ — Frequently-Asked Questions about the Extensible Markup Language

Section 4: Developers

Q 4.10: What about JSON?

What about it?

JavaScript Object Notation (JSON) (http://json.org/) is a data-interchange format aimed at programs written in JavaScript and other languages sharing the same C-like conventions. The standard (RFC 4627) says it is ‘a lightweight, text-based, language-independent data interchange format’ for the ‘portable representation of structured data’.

It is very suitable for representing rectangular data (row-and-column data, see the topic ‘Data-style applications’ in question D.14 on ‘What is my information? DATA or DOCUMENT?’) including that destined for (or coming from) spreadsheets, label/value sources, relational databases, and other sources, particularly where the structure is not deeply nested.

It is not suited to the storage of information using Mixed Content (see the topic ‘Document-style applications’ in question D.14 on ‘What is my information? DATA or DOCUMENT?’) — the normal ‘document’ XML format where text and markup are arbitrarily intermingled to any depth, such as in traditional XML applications, eg DocBook, TEI, JATS, question A.5 on ‘What is HTML?’, etc. In such cases, JSON becomes unwieldy and ceases to be human-readable.

There are ongoing discussions at