Sunday, June 11, 2006

JSON - A common sense exchange format

Introducing JSON

JSON is a format for exchanging data between applications. The format that is essentially the JavaScript notation used to represent objects and arrays.

So, the following is valid JSON code:

{
  start: 1008484,
  end: 299990,
  contents: ["First", "Second", "Third" ]
}

What I love about this format is that not only is it simple, but there's plenty of experience that shows that it works. And it's way more terse than using XML.

It's not as regular as sexprs - but then again, it doesn't need to be. It just needs to represent a handful of concepts (numbers, strings, arrays, objects, booleans and null) - so why go more generic than you need to be?

Gosh I love standards that are sane.

The above site provides all sorts of implementations of the JSON format. So, there's no excuse for not using the format today.

No comments:

Post a Comment