4 ms·
JSON can be parsed using SGML [1], by instructing SGML to interpret JSON tokens such as colons, quotation marks, and curly braces as markup. The underlying tech
by tannhaeuser 3y ago
JSON can be parsed using SGML [1], by instructing SGML to interpret JSON tokens such as colons, quotation marks, and curly braces as markup. The underlying technique for custom lightweight markup is called SHORTREF and can be applied to markdown etc. as well.
So considering XML is subsetted from SGML, I guess the answer is closer to yes than thought.
Though probably it's worth citing the following quote from that paper:
> If the sweet spot for XML and SGML is marking up “prose documents”, the sweet spot for JSON is collections of atomic values.
[1]: https://www.balisage.net/Proceedings/vol17/html/Walsh01/BalisageVol17-Walsh01.html https://www.balisage.net/Proceedings/vol17/html/Walsh01/Bali...
- lifthrasiir 3y ago> JSON can be parsed using SGML, [...]. So considering XML is subsetted from SGML, I guess the answer is closer to yes than thought. In the other words, SGML was way too powerful than what we actually needed. Of course we are with the benefit of hindsight though.
- tannhaeuser 3y ago> SGML was way too powerful The widespread use of markdown and other lightweight markup rather than rigid XML-style fully tagged markup for authoring tells otherwise though. And so does the continued use of HTML chock full of SGMLisms such as tag inference and attribute shortforms that weren't included in the XML subset/profile when XML (XHTML) was created to replace HTML. So while XML isn't used as an authoring format on the web (nor as delivery format), it's still useful as canonical archival format I guess.
- lifthrasiir 3y agoSGML is a meta-language unlike every other example in your reply, so the prevalence of such semi-structured languages (including SGML applications) doesn't justify SGML itself. Even HTML is not exactly an SGML application (except for HTML 4), and in my knowledge implementing HTML with a generic SGML implementation was rarely done. So the fact that SGML is a near superset of both JSON and XML doesn't mean much.