Add support to return a the list of posts in JSON format.