Geeks With Blogs

Lance's TextBox

Drew McLellan says that all web services and API's need to offer JSON output:  “if you want people to hack on your APIs, roll out JSON support“.  Several people made this same kind of comment in some of the feedback for the first beta of RSSBus.

Then, during the first beta, if I wanted to get a feed of MSFT and BORL stock quotes using the yahooStockQuotes operation that comes with RSSBus, I could call:


Now, during the second beta, I can use the same url - but add the @json querystring argument:


The result that I get back is the same output items in JSON instead of RSS:

({"items":[{"yahoo:low":"24.20","yahoo:volume":"14113689\r","yahoo:date":"8\/11\/2006","rss:title":"MSFT: 24.2928","yahoo:symbol":"MSFT","yahoo:open":"24.34","yahoo:time":"12:34pm","yahoo:change":"-0.1672","yahoo:high":"24.43","yahoo:lastvalue":"24.2928"},{"yahoo:low":"5.17","yahoo:volume":"74404\r","yahoo:date":"8\/11\/2006","rss:title":"BORL: 5.20","yahoo:symbol":"BORL","yahoo:open":"5.34","yahoo:time":"12:34pm","yahoo:change":"-0.13","yahoo:high":"5.34","yahoo:lastvalue":"5.20"}]})


Also I could output this in HTML if I wanted - just by using @html instead of @json.  But thats not nearly as exciting to me.  :P

Posted on Friday, August 11, 2006 10:01 AM Programming , Software | Back to top

Comments on this post: RSSBus JSON output

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Lance Robinson | Powered by: