WP-JSON

WP-JSON is a plugin that easily enables you start syndicating your blog entries using JSON. This enables third party integration with JavaScript solutions cross domain without use of proxy. Supports JSON-callback parameter. If mod_rewrite permalinks are enabled call /feed/json/?callback=METHOD and if mod_rewrite is disabled call using ?feed=json&callback=METHOD

Inspired by this blog post but now bundled as a plugin and with support for PHP installations lower than 5.2.0.

Example of usage when activated

$(function(){
	$("body").append('<div id="wp-json">Loading JSON</div>');
	$("#wp-json").css({
		'position' : 'fixed',
		'right' : '0px',
		'top' : '0px',
		'background' : '#f00'
	});
	$.getJSON('http://frontendbook.com/feed/json/?callback=?', function(json){
		var result = '<ul>';
		$.each(json.items, function(){
			result += '<li><a href="' + this.link \
                        + '">' + this.title + '</a></li>';

		})
		result += '</ul>';
		$("#wp-json").css({
			'background' : '#fff'
		}).html(result);
	});
});