Added JSON format in controller