fredag den 6. marts 2009

Dave Winer on JSON vs XML


I en browser er JSON klart en vinder ...
/Sik


In the browser JSON is a clear winner ...
/Sik


  Time (in seconds)/ Run 
Test Runs1002004001600
XML / XSLT0.010140.0108450.01162250.01213875
JSON / JSONT0.019190.019580.02000750.02013375
JSON / Javascript0.004210.0042150.003940.004153125

Quote

Dave, if you could go back in time, would you have used JSON instead of XML for RSS, OPML, XML-RPC, etc, had JSON been popularized at the time?

The reason I ask is that most of those protocols and formats don’t use much of the extras that XML is required for (schemas, namespaces, attributes, data escaping, etc). Simple key/value/dict/array/string/number structures would be sufficient in all those cases. If you could take a do-over, would you?

Great question! And if you look at how I use XML, you know the answer is yes. I have no love for XML, I thought it was over engineered, and too much was promised for it, but everyone wanted to do it, and that convinced me. The important thing is the consensus. One way to do things. And the second guy to come along has the power to make the standard, and in XML I was one of the “second guys” (the first wave were the guys at Microsoft, Netscape, Sun, etc). [...]


Read more: 

Ingen kommentarer:

Send en kommentar