Added JSON api for posts
Added JSON api for posts