web

Just what we needed, how nice

December 20, 2006 14:39:55.168

I don't often agree with Dave Winer, but he has JSON nailed: what were the developers of that thinking? Just as XML formats have become somewhat standard, we needed to invent something different just for the heck of it? Here's the JSON format description - it's basically key value pairs, surrounded by curly braces and quotes. Yeah, I really want another parser in my application to bulk it up some more. Thanks.

Technorati Tags:

Comments

Dave Winer is missing the point

[Giovanni Corriga] December 20, 2006 15:39:04.870

JSON isn't a general purpose data description language. As a subset of JavaScript, it's meant to be consumed by web browser when displaying websites that use Ajax features such as Google Maps, Frappr etc. In this context, it has its advantages: every browser can interpret JavaScript, so JSON doesn't need an extra parser (just do an eval() ); serialization to JSON is immediate for JavaScript object, via the toString() method of the Object object, etc. etc.
The comments to Winer's post have more useful info on JSON.

JSON and XML

[Patrick Logan] December 20, 2006 17:12:26.444

Let's not stick with XML just because someone once thought it was a good idea or some industry bigwigs latched onto it as a meal ticket. XML has big problems and JSON is simple. There are many reasons to go with JSON. Simple wins in many cases.

If there is no parser in Smalltalk yet, take heart. I wrote a sufficiently simple-yet-featured one in Python in a few hours and have since spent a total of an hour or three on fixes.

Re: JSON and XML

[ Michael Lucas-Smith] December 20, 2006 17:23:56.906

Comment by Michael Lucas-Smith

And it's not like it'll be bloated, at most it'll be one or two classes in a single package. I read the spec - seems pretty simple and straight-forward to me. It seems to borrow some ideas from C as well, interesting. It'll be easy for it to be implemented in Javascript which'll make it a possibly good idea.

In terms of dumping XML, even the bigwigs at W3 are seeing the light - check out RDF/N3 some time and see what I mean - it's an uber nice version of RDF and can do more then RDF/XML. N3 is more useful than JSON simply because it is transporting information, not data.. so I guess JSON is a bit of a reinventing the wheel - at least it is reinventing it the right way.

it's not a new format for format's sake

[Joshua Schachter] December 20, 2006 19:23:02.504

We used JSON because that is the way you can get data into a page from a different domain via Javascript. There is not a lot of flexibility here otherwise. 

JSON looks like a fine format to me

[Troy Brumley] December 21, 2006 0:52:25.941

There's good support for it in the environments it's meant for, and it removes a lot of the overhead associated with XML.  Parsers exist.  Standards compliance for the sake of standards compliance leads to everyone using .NET or Java or whatever vendor dominates the standards war.

 

Maybe the developers with balls are the ones who use JSON instead of carrying the weight of XML around? ;) 

Re: JSON looks like a fine format to me

[ Michael Lucas-Smith] December 21, 2006 3:46:53.774

Comment by Michael Lucas-Smith

The truth is, if you've got your balls there, you're generating javascript to send to the client and run it instead of sending content via JSON or XML :) JSON has its place obviously. And in the end, you need to make a DOM tree - so you're dealing with XML any way.

 Share Tweet This
-->