added JSON view for posts