Add possibility to get JSON, also changed changing posts.