Make controller to return JSON