public static function json($data, $status = 200, $headers = array())
    {
        $jsonHeader = array('Content-Type' => 'application/json');

        $content = json_encode($data);

        return new Response($content, $status, $jsonHeader);
    }
public static function json($data, $status = 200, $headers = array())
    {
        $jsonHeader = array('Content-Type' => 'application/json');

        $content = json_encode($data);

        return new Response($content, $status, $jsonHeader);
    }
public static function json ( $ data , $ status = 200 , $ headers = array ( ) ) { $ jsonHeader = array ( 'Content-Type' => 'application/json' ) ; $ content = json_encode ( $ data ) ; return new Response ( $ content , $ status , $ jsonHeader ) ; }
Return JSON response.

@param array $data
@param int   $status
@param array $headers

@return Response
Return JSON response .