I have just finished a very simple plugin that enables JSON-syndication for blogs running on WordPress. You can test the output on this blog.
http://frontendbook.com/feed/json/?callback=? (content-type:application/json)
Find out more
Why
- I think JSON is a very powerful way to syndicate content and data
- I think we should not need to write stupid proxies for aggregating feeds via JavaScript
- Opening up your data is a good thing
- I could not find a working example that was a plugin, all solutions I found was hacks in the actual source code of WordPress.
jQuery Example Retrieving JSON
[sourcecode language='javascript']
$(function(){
$(“body”).append(‘
Loading JSON
‘);
$(“#wp-json”).css({
‘position’ : ‘fixed’,
‘right’ : ’0px’,
‘top’ : ’0px’,
‘background’ : ‘#f00′
});
$.getJSON(‘http://frontendbook.com/feed/json/?callback=?’, function(json){
var result = ‘
- ‘;
- ‘ + this.title + ‘
$.each(json.items, function(){
result += ‘
‘;
})
result += ‘
‘;
$(“#wp-json”).css({
‘background’ : ‘#fff’
}).html(result);
});
});
[/sourcecode]
Feed aggregation can be accomplished using Google’s Ajax Feed API. This way you can interact with any sites whom have a RSS or Atom feed already, and get a JSON result set back from Google. Google will also act as a proxy for you giving you fast results without needing a server-side component, you can just use JavaScript.
Eric Ferraiuolo´ s last blog post..Using Google’s Ajax APIs