WP-JSON – JSON Syndication for your WordPress Blog

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 = ‘

‘;
$(“#wp-json”).css({
‘background’ : ‘#fff’
}).html(result);
});
});
[/sourcecode]

Download