3 ms·
One of the whole points about JSON is that you can write a serializer/deserializer in a few lines of code. It's a ridiculously simple, standard format. Compare
by axod 17y ago
One of the whole points about JSON is that you can write a serializer/deserializer in a few lines of code. It's a ridiculously simple, standard format.
Compare that with massive bloated complex XML parsers.
Good on them for using JSON.
- abstractbill 17y agoAnd an even better thing is that you almost never have to - the list of languages without a free standard implementation of json is pretty uninteresting. I like json a lot - it's a better reincarnation of s-expressions than xml was. The only thing I wish for is that it had a symbol type, so that I could use it as a syntax for programming languages as well as data ;)
- natrius 17y ago"One of the whole points about JSON is that you can write a serializer/deserializer in a few lines of code." Not without a good library for parsing. I'd be impressed by a robust JSON parser written in a few lines of code using just the standard library of any language.
- snprbob86 17y agohttp://awwx.ws/combinator/toc http://awwx.ws/combinator/toc
- tomjen3 17y agoJSON is easier to parse if you have to write your parser from scratch, but there are parsers for nearly all languages so you don't have to. JSON on the other hand, means you have to write your own parser. And really, why not do as twitter does and make it available in both xml and json formats?
- axod 17y agoHere's for why. http://gdata.youtube.com/feeds/api/videos/cK3N2DC3Fds http://gdata.youtube.com/feeds/api/videos/cK3N2DC3Fds Look at that data and tell me it's beautiful and efficient. It's a crapfest of mammoth proportions. Unfortunately in the case of youtube, you can ask for it in JSON, but it'll just take the crapfest of XML and convert it to an even bigger pile of rubbish: http://gdata.youtube.com/feeds/api/videos/cK3N2DC3Fds?alt=json http://gdata.youtube.com/feeds/api/videos/cK3N2DC3Fds?alt=js...
- tomjen3 17y agoIt is not beautiful, but when I throw my LINQ-to-xml magic at it, it will be quite easy to work with.