MML: Multi Markup Language — When one markup language just isn’t enough
Copyright © David A. Lee
The fundamental arguments in the “XML” vs “JSON” “Debate/War” are irrelevant. True, XML can be extremely complicated and bloated for what should be a simple task. True, JSON lacks native support for mixed content, complex types, and is difficult to hand edit. In complex environments it is necessary to exploit the advantages of each format and to mitigate the weaknesses of each. Using as an example a multi-year ongoing project of authoring and managing the lifecycle of a particular document type, I will demonstrate how very minor differences in markup style, ironically differences intentional designed into JSON specifically as a counterpoint to XML “complexity” make a huge impact on the ability of software to assist in the editing process, and equally for humans to accurately author and modify even small documents. These little things — added together — make even “well formedness” validation impossible, useless, or worse — a valid document that is structurally different than what it appears.
I propose to solve this problem with “MML”; a hybrid approach for multi markup documents. “MML” allows multiple “Native Markup” variants of the same document to co-exist. Simple transformations can produce variants of the document suitable for different tooling including JSON and XML formats, each of which is syntactically valid for the specific markup language. This is critical for early error detection and integration with existing tools.