Currently our json responses are not formatted at all, we are using the JsonResponse
class to return a status code with content:
public function getMarkets() {
$response = $this->marketService->getMarkets();
return new JsonResponse($response, 200);
}
Is there an easy way to make sure all json responses are formatted as camel case or do we have to make sure the properties are camelcased before passing them to the JsonResponse object?