- return $this->renderJsonResponse($json);
- }
-
- /**
- * Send a JSON Response.
- * We don't use the Symfony JsonRespone, because it takes an array as parameter instead of a JSON string.
- *
- * @param string $json
- *
- * @return Response
- */
- private function renderJsonResponse($json, $code = 200)
- {
- return new Response($json, $code, ['application/json']);