Replacing template based response with json