[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: json v. xml

  • From: "Joe Fawcett" <joefawcett@h...>
  • To: xml-dev@l...
  • Date: Fri, 05 Jan 2007 09:55:38 +0000

json xml flexibler
Having used and written about both techniques I might as well chime in.
For use in Ajax, when exchanging moderately simple messages that will only 
be used internally, i.e. a web service only used by your own clients, JSON 
has the advantages of smaller message size, unless the messages are really 
tiny such as 'OK' etc, lack of need of other libraries to read and, if you 
don't use currently XML, nothing really new to learn.
On the other hand XML is much more flexible and handles documents better, 
most platforms support it and it can take advantage of schemas, transforms, 
WSDL etc. which don't really exist in JSON.
JSON still needs a library to create the object representation, otherwise it 
can be very tedious and repetitive, and is more of a risk, eval-ing a 
response could open the door to attacks, even if only annoyances for the 
client.

So my view is, for relatively simple in-house messages JSON can have 
advantages, otherwise it loses to XML.

As usual any generic standard can be bettered for an individual application 
by a domain specific one, the point is not having to learn a million 
different techniques and to put up with the occasional downside.

Joe


>From: "Rick Jelliffe" <rjelliffe@a...>
>To: "xml-dev@l..." <xml-dev@l...>
>Subject: Re:  json v. xml
>Date: Fri, 5 Jan 2007 12:53:12 +1100 (EST)
>
>derek denny-brown said:
>
> > Aside from the cross-domain issue, I think XML also missed the boat by
> > not providing a canonical 'object serialization', akin to JSON.  Part
> > of the explosion of JSON is due to it's low barrier to entry.
>
>"Missed the boat" suggests that canonical object serialization should have
>been a goal of XML in the first place, which it wasn't. (But perhaps Denny
>is right: if we'd gonge with the instance-based type annotation ideas that
>IIRC Charles Goldfarb suggested, this would be a different discussion.)
>
>The world is big enough for more than one syntax for things. JSON is to
>XML what IDL is to DTDs.
>
>Ultimately, the XML methodology is markup: annotation. (And arbitrary,
>unlimited annotation with arbitrary constraint checking.) Not everything
>should be markup.
>
>We are better off with two (or ten) small, distinct languages that
>developers can master rather than multiplying the complexity of XML in
>futile attempts to make it useful for everything. The opposite of
>complexity is not simplicity but modesty.
>
>As I understand JSON, it is merely client-side programmers saying "Hey, we
>already have a syntax for representing data structures in JavaScript, why
>not just use that so we don't need any special API for naming and
>navigating?" That is an utterly reasonable position, it seems to me.
>
>Cheers
>Rick Jelliffe
>
>_______________________________________________________________________
>
>XML-DEV is a publicly archived, unmoderated list hosted by OASIS
>to support XML implementation and development. To minimize
>spam in the archives, you must subscribe before posting.
>
>[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
>Or unsubscribe: xml-dev-unsubscribe@l...
>subscribe: xml-dev-subscribe@l...
>List archive: http://lists.xml.org/archives/xml-dev/
>List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>




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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.