JSON and RSS


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.

Posted: December 17th, 2005


If you particularly enjoy my work, I appreciate donations given with Gittip.

5 Comments (Show Comments)



Comments are closed.
Comments are automatically turned off two weeks after the original post. If you have a question concerning the content of this post, please feel free to contact me.


Secrets of the JavaScript Ninja

Secrets of the JS Ninja

Secret techniques of top JavaScript programmers. Published by Manning.

Ukiyo-e Database and Search

Ukiyo-e.org

Japanese woodblock print database and search engine.


John Resig Twitter Updates

@jeresig

Infrequent, short, updates and links.


via Ad Packs