Re: [xml-dev] json v. xml

From
Elliotte Harold <>
To
derek denny-brown <>
Date
2007-01-05T13:54:43Z
ID
<>
Thread
Re: [xml-dev] json v. xml
derek denny-brown wrote:
> These questions seem to be falling into the same trap that Dare
> complained about.  JSON is a simple single solution to a whole set of
> problems.  It addresses cross-domain access.  It is fast.  It is easy
> to use.  On every account, XML fares worse.

I call B.S. on this one.


> JSON is just object serialization.  

And that is its flaw. JSON is a nice 80/20 solution to one problem, but 
no more than that. The world is not serialized objects. XML is not 
serialized objects.


> I sure hope not.  I've always found the DOM a horribly awkward
> programming model.  It was a valiant attempt at building an API that
> supports both text-markup XML and data-serialization XML, but the
> strain from being stretched by two very different use-cases shows.

Not really. DOM sucks but that's not at all why it sucks. The reasons 
include backwards compatibility with early poorly designed browser DOMs, 
a cross-platform language design that limits it to a least common 
denominator, and design by committee. The need to support both 
text-markup XML and data-serialization XML really doesn't factor into it.

Check out XOM or E4X sometime to see what a really clean XML object 
model can look like without needing to subset the documents it can support.

-- 
Elliotte Rusty Harold  
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/