XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Is the set of languages expressible using XML asuperset of the set of languages expressible using JSON?

Both XML and JSON allow a countably infinite set of instances, and there is a one-to-one correspondence between two countably infinite sets: both sets are equally big.

But that's not actually what you're asking. You're asking about the number of "XML languages" and "JSON languages". By "XML language" I guess you mean a set of rules that define a subset of XML instances, and similarly a "JSON language" defines a subset of JSON instances. The number of XML languages depends on the expressive power of the schema language that you are using to define these languages, but with any practical schema language the number of schemas you can write (that is, the number of "XML languages" or "JSON languages" you can define) is also going to be countably infinite, and so once again, the two sets are equally big.

Now you ask whether the set of XML languages is a superset of the set of JSON languages, and the answer is obviously no, because the two sets are disjoint: there is no XML language that is also a JSON language, and vice versa.

I suspect that none of this is what you really wanted to know. What you really want to know is, does XML have greater "expressive power" than JSON in some sense. Both XML and JSON give you the same number of bits to play with, so in an information-theoretical sense they are equivalent. What it really comes down to is usability, which is a different question entirely.


Michael Kay
Saxonica


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS