Funny, Dave's post and the subsequent excellent discussion have probably inadvertently pushed JSON's awareness level a little higher (based on all the positive exclamations of discovery in that thread), more people will end up using JSON now, thanks to Dave's ignorance.

Hopefully all the thoughtfully written comments have helped Dave learn what JSON is all about. Of course there was some off-the-cuff ranting to add to the comedy. Here's the rant in case he later takes it down:


As Dr Phil asks — What were they thinking?

No doubt I can write a routine to parse this, but look at how deep they went to re-invent, XML itself wasn’t good enough for them, for some reason (I’d love to hear the reason). Who did this travesty? Let’s find a tree and string them up. Now.

Ladies and gentlemen, boys and girls, this is why I’m fed up with Mountain View, Cupertino, Redwood Shores and Redmond. Give me Berkeley and New York any day. Silicon Valley is made up of little boys pulling their puds, constantly making love to each other, pretending the world revolves around them.

The funny part is that JSON is so much simpler than any other format out there, so I really do find it surprising that Dave doesn't "get it". Sometimes it's hard to tell when someone is just clueless or on an ego trip (and hey, everyone is a little of both once in awhile). Here are some choice nuggets from the comments section:

Matthew Gifford:

The nice thing about JSON is that you *don’t* have to parse it on the client side. Just save the returned data as a JavaScript variable and your data object is ready to go.

Spoken like someone who really wants to get something done instead of mess around with XML parsing to extract an array of integers...

Joe Hewitt:

First of all, you have to keep in mind that JSON was not invented, it was discovered. Nobody sat down and set “Let’s re-invent XMLRPC in JavaScript!” It was simply that developers working with JavaScript realized that the language itself had a nice shorthand syntax for encoding generic data structures, and ran with it.
So, at the end of the day, it comes down to a question of usability. JSON is just much more usable than XML if you’re writing JavaScript.

Exactly! There was no "pud-pulling" here, Dave.

Douglas Crockford:

I liked the part where Dr Phil said “What were they thinking?” I asked the same question when I first saw XML being proposed as a data format. There were obviously better alternatives.

The good thing about reinventing the wheel is that you can get a round one.

Me too 🙂 Of course, I have learned since those earlier, naive days that XML has its place and certainly isn't going away anytime in the foreseeable future...

§323 · December 21, 2006 · JavaScript, QuickLinks, Software, Technology, Web, XML · · [Print]

Leave a Comment to “Winer Learns a Little JSON”

  1. Rob says:

    I’m with Winer on this one. JSON is language-specific, end of story. All the intelligence and hard work that’s gone in to XML should provide some great lessons to learn from. When I was first introduced to XML the beauty was in the simplicity. The reason it’s grown more complex is that it solves complex problems.

    Look at wikimedia’s wiki markup. It started out as a simple alternative to HTML. Have you ever tried to make a table in Wiki markup? It’s horribly complex, ugly, and arbitrary for anything more than the links, lists and preformatted text that it initially replaced.

    If you want to keep using JSON for simple things then I can understand that. But when everyone runs in to the same complex problem that springs from JSON’s over-simplified desgin, do you think everyone’s going to back up and say “wait, XML solves this complex problem so let’s back up and re-design the application with XML” ? No, they’re going to make another more complex hack into JSON.

    E4X adds simple XML support to Javascript. E4X is already supported in Firefox. E4X solves the real problem which is that the DOM isn’t exposed as a native data structure in the language that sees XML every day: Javascript.

    JSON solves the problem today at the cost of wasted time tomorrow.

  2. Careful. Did you actually read Dave’s arguments? First, dismissing a format simply because it is not XML is short-sighted on his part. Then claiming that the processing power to parse XML is “negligible” when compared with Flash … huh? He clearly does not understand the benefits of JSON on that one. I’ll be interested to see what his response is today, anyway.

    What does wiki markup have to do with JSON? Sure writing a table is hard in wiki markup, but it’s equally hard in HTML. So what? That doesn’t apply to the discussion of whether a format has merit if it’s not XML…

    And yes, E4X would be nice, I think everyone agrees with that – but personally I’m not going to just wait for the other big browsers to implement support. Unless you want to design a Firefox-only app, it’s a non-starter so far.

    No one is proposing to get rid of XML, so don’t get your panties in a bunch. And I’m not saying JSON is a silver bullet that solves all problems, either. No one is, in fact. But for a simple mechanism to pass around basic data structures in JS, it beats the pants off of XML and the subsequent DOM parsing that must occur. End of story.

  3. FYI, regarding E4X I came across this comment. I have no idea of the truth of it, just that it seems like really strong comments to make from someone involved with Mozilla.