I’ve been bit by the JSON bug. For a long time now, I’ve simply shrugged it off as ‘Why not just use XML, it’s parsable by most languages anyway.’ However, once I started playing around with the del.icio.us JSON interface, then the Google Homepage API, and finally with the new Yahoo! JSON API – I realized that they were really on to something. The major benefits are immediately apparent:
- It’s incredibly lightweight – there’s almost no extra markup, which keeps the data transfers nice and small.
- There’s very little overhead needed to parse it, since it’s pure Javascript to begin with (and a number of other languages can either handle it as-is, or have a module to parse it).
- and, probably most importantly, you can use it in a cross-domain environment. This exists due to the fact that you can execute remote Javascript (aka a JSON object), no matter what domain you’re coming from. You can now completely skip the previously necessary (for XML) proxies.
So, this brings me to my first project using JSON – a fast RSS to JSON Convertor. You simply plug in the URL of the RSS (or Atom) feed that you wish to convert – and you’ll have a nice, plyable JSON object to work with. I cache all retreived files every hour, to save on bandwidth, so please be aware of that. It also supports the addition of callbacks, making it easy to use in your program, right out of the box. If you’re interested in seeing a demo, along with some sample code (and the code of the convertor), feel free to visit the project page.
The nice thing about having a RSS to JSON Convertor is that you can now convert any RSS source and play with it instantly – for example, your Google Search History, the Latest TV Listings, or even your POP Email Account. The possibilities are endless. I can’t wait to play with this some more.
Johan Sundström (December 18, 2005 at 3:19 am)
GVisit offers JSON feeds of recent visitor locations. It’s a lot of fun to play with mashing that up with the Google Maps API. (Or other mapping services, of course, if so inclined.) I might be overdoing it. ;-)
Jordan Sissel (December 25, 2005 at 10:09 pm)
I’ve been playing with JSON recently for one of my pet projects. Previously I was using XMLRPC. JSON gives very significant speed improvement, though I don’t have exact numbers.
Jon Schull (January 24, 2006 at 10:33 pm)
A (slightly) lesser man would say “I told you so.”
(JQuery looks interesting)
BrockLi (January 26, 2006 at 9:38 pm)
JavaScript, JSON, and PHP
John first mentioned JSON about a month ago, but at the time I had no inclination to look into it and find out if it was something I could use. It came across my radar again today thanks to a…
Joe (October 11, 2006 at 2:37 am)
Sweet