public function render($content, Response $response)
    {
        $response->setStatusCode(Response::HTTP_OK);
        $response->headers->set('Content-Type', 'application/json');
        $response->setContent(json_encode($content));

        return $response;
    }
public function render($content, Response $response)
    {
        $response->setStatusCode(Response::HTTP_OK);
        $response->headers->set('Content-Type', 'application/json');
        $response->setContent(json_encode($content));

        return $response;
    }
public function render ( $ content , Response $ response ) { $ response -> setStatusCode ( Response :: HTTP_OK ) ; $ response -> headers -> set ( 'Content-Type' , 'application/json' ) ; $ response -> setContent ( json_encode ( $ content ) ) ; return $ response ; }
Renders any given content as a json string

@param mixed    $content  This can be serializable data type.
@param Response $response The response object

@return Response $response
Renders any given content as a json string