Provide response in json format if post is successful.
Removed comments and fixed formatting.