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] List of differences between XML and JSON?

On Thu, 30 Apr 2015 11:01:48 -0400, Ihe Onwuka wrote:
> On Thu, Apr 30, 2015 at 10:53 AM, Amelia A Lewis <amyzing@talsever.com>
> wrote:
>>> -          XML has namespaces, JSON does not.
>> 
>> Win for JSON.
> 
> Is it?
> 
> How would you represent (insert some complex namespacey markup language
> here) in JSON then?

I wouldn't.

*sigh*

I also wouldn't try to represent mixed content in JSON. *shrug*

XML namespaces is intended to allow arbitrary mixes of namespaces. It's 
not much used for that, but that's why it has the complexity that it 
has, to support the generality that it's supposed to permit. A better 
solution, in my opinion/experience, would be to design a vocabulary 
that merges the target vocabularies as needed.

As a general rule, XML that rebinds the global/empty prefix is less 
horrendous than XML that makes extensive use of specific prefix 
bindings. This isn't the case for things like XML schema, XSLT, and 
other technologies which were specified in the full flush of Namespaces 
in XML 1.0. Avoiding namespaces in XML is generally a good thing.

For JSON, I'd definitely recommend some solution less painful than one 
modeled on XML namespaces, if there's a need for it. I haven't seen 
anyone suggesting such a need, though of course I'm not omniscient on 
that score.

Amy!
-- 
Amelia A. Lewis                    amyzing {at} talsever.com
But pain ... seems to me an insufficient reason not to embrace life.  
Being dead is quite painless.  Pain, like time, is going to come on 
regardless.  Question is, what glorious moments can you win from life 
in addition to the pain?
   -- Cordelia Naismith Vorkosigan [Lois McMasters Bujold, "Barrayar"]


[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