framework/RedKiteCms/Rendering/Controller/BaseController.php
protected function buildJSonResponse($value, $status = 200)
    {
        if (is_array($value)) {
            $value = json_encode($value);
        }
        $response = new Response($value, $status);
        $response->headers->set('Content-Type', 'application/json');

        return $response;
    }
protected function buildJSonResponse($value, $status = 200)
    {
        if (is_array($value)) {
            $value = json_encode($value);
        }
        $response = new Response($value, $status);
        $response->headers->set('Content-Type', 'application/json');

        return $response;
    }
protected function buildJSonResponse ( $ value , $ status = 200 ) { if ( is_array ( $ value ) ) { $ value = json_encode ( $ value ) ; } $ response = new Response ( $ value , $ status ) ; $ response -> headers -> set ( 'Content-Type' , 'application/json' ) ; return $ response ; }
Builda a json response
@param mixed $value
@param int $status

@return \Symfony\Component\HttpFoundation\Response
Builda a json response @param mixed $value @param int $status