Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Any reasonably regular, reasonably simple, reasonably compact syntax will work just fine. And programmers have a habit of inventing new ones either to "fix" things they didn't like about an earlier syntax or simply to make it obvious at a glance which markup is being used. Basically, Michael Kay's answer is correct -- it's a fairly arbitrary choice, and the basic answer is "because JSON and XML didn't happen to go that way."</p> <p>There are probably some actual reasons, though.</p> <p>For example, XML was designed to be mostly compatible with SGML-based document processors (HTML is SGML-based, for example), since at the time it was being thought of as an attempt to create an easier-to-work-with subset/substiset of SGML. That gave it the basic angle-bracket-and-attributes syntax. The rest has evolved from that starting point. This was absolutely the right choice early in XML's evolution since it let people take advantage of some existing SGML tooling and tap into an existing SGML user community. Now... it is what it is, and there's no good reason to change it.</p> <p>I can't vouch for what inspired the decisions behind JSON's syntax, other than some of it being in reaction to perceived (and exaggerated) disadvantages of XML.</p> <p>Lisp S-expressions have as many detractors as fans... among those who actually remember them at all. There used to be an old joke that LISP stood for "Lots of Irritating, Silly Parentheses." They're easy to parse... but in the end not significantly easier than the alternatives. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload