11 May 2006

Speeding Up AJAX with JSON

Posted by Mikhail Esteves under: AJAX; Tips .

XML is the standard way to interchange data, but it’s often not the best way. Although XML can add structure and metadata to data, it does so in an overly verbose way. XML also has a fairly complex syntax, requiring a non-trivial parser to attack it. In JavaScript, XML must be parsed into a DOM tree to be used. And, once you’ve constructed the DOM tree, you still have to pilot through it to create corresponding JavaScript objects or otherwise use the XML data in your client-side Web application.

Fortunately, there’s a better way.

Welcome to JSON

The JavaScript Object Notation, or JSON, is a lightweight syntax for representing data. JSON’s elegance comes from the fact that it’s a subset of the JavaScript language itself.

Link

Technorati Tags , ,


One Comment so far...

Anonymous Says:

18 September 2007 at 6:10 am.

XML is not “the standard way to interchange data”.
XML is A standard, not THE standard.
And it isn’t even very standard.
Hooray for JSON.

Leave a Reply

Browse

Photography

Projects

Pages

Calendar

May 2006
M T W T F S S
« Apr   Jun »
1234567
891011121314
15161718192021
22232425262728
293031  

Categories

www.flickr.com

Use OpenDNS