Listen to the Joystiq Podcast (because your ears can't read)

JSON: Lightweight data interchange

While XML seems to be the de facto choice for most data interchange these days, there are alternatives. One that seems to be getting some attention lately is JSON (JavaScript Object Notation).  While it isn't XML-based, you may still find JSON's syntax familiar, because it's based on JavaScript.

While there are implementations of JSON in just about every common language, one particularly easy implementation is the JavaScript one—since the JSON data is valid JavaScript, a simple eval statement is all you need to convert it into a JavaScript object.

As with many things in the field of technology, there are some nearly-religious arguments about which is the best choice. Here's the official line on why JSON beats XML, at least for data interchange. There are some good points there, although I disagree with parts—for example, it calls JSON "much easier for humans to read than XML." I find XML much more human-readable than JSON myself, but your mileage may vary.  Mark Nottingham has a more even-handed look at how JSON stacks up to XML. [via Simon]

Sidestepping the religious wars, over the next few days I'm going to take a closer look at JSON and some of the things it can do, and try creating some simple implementations myself. Stay tuned.

Reader Comments

(Page 1)

RESOURCES

RSS NEWSFEEDS

Powered by Blogsmith

Other Weblogs Inc. Network blogs you might be interested in: