Modified android controller to return a JSON object