public function json($data, $status = 200)
    {
        $this->header('Content-Type: application/json');

        $this->statusCode($status);

        return json_encode($data);
    }
public function json($data, $status = 200)
    {
        $this->header('Content-Type: application/json');

        $this->statusCode($status);

        return json_encode($data);
    }
public function json ( $ data , $ status = 200 ) { $ this -> header ( 'Content-Type: application/json' ) ; $ this -> statusCode ( $ status ) ; return json_encode ( $ data ) ; }
To response with json

@param string $data
@param int    $status

@return string
To response with json