Ads are not an endorsement by the blog author.

Abstractioneer

Public Journal
 Back to Journal Archives | Subscribe to Alerts Alerts Subscribe to Alerts | Feeds
< Why AOL Should Go
Friday, December 15, 2006
Yes, Steve, I do  >
Sunday, January 14, 2007
January 2007
Thursday, January 11, 2007

Generic Atom-to-JSON Conversion

Yesterday, our feeds infrastructure team released a bunch of new code.  There's actually a lot that this service can do; one of the cooler things it now does is to convert arbitrary Atom or RSS feeds into cross-domain-retrievable JSON data structures:

curl -v 'http://headlines.favorites.aol.com/hlserver/api/GetFeed.do?
url=http://journals.aol.com/panzerjohn/abstractioneer/atom.xml&format=atom-json&callback=cb'

which returns, in part, the data structure below.  The big win is the ability for any web page to retrieve feed data from any feed source without needing to set up a custom proxy.  Obviously, there's still a proxy involved here, and it's one we're running; it does both feed format normalization and caching and is highly scalable.  I hope we can turn this into a supported, documented API on dev.aol.com soon.

The output looks like this:

cb(
{
"feed" :  
  {
  "aj:accessType":
      {"xmlns:aj":"http://journals.aol.com/_atom/aj#","content":"public"},
  "xmlns:sy" : "http://purl.org/rss/1.0/modules/syndication/",
  "aj:blogShortName":
      {"xmlns:aj":"http://journals.aol.com/_atom/aj#","content":"abstractioneer"},
  "title":"Abstractioneer",
...
  "entry": [
    "title":"Why AOL Should Go OpenID",
    "published":"2006-12-15T23:15:48Z",
...

});


There are a few oddities in the output -- atom:author gets mapped to dc:creator, for example -- which I'll find out about tomorrow.


panzerjohn at 10:49:00 PM PST Blog about this entry
This entry has 2 comments: (Add your own)