src/classes/CCResponse.php
public static function json( $data = array(), $status = 200, $beautify = true ) 
	{
		if ( !is_array( $data ) )
		{
			throw new CCException( "CCResponse::json - first argument has to be an array." );
		}

		$response = new static( CCJson::encode( $data, $beautify ), $status );
		$response->header( 'Content-Type', 'text/json' );

		return $response;
	}
public static function json( $data = array(), $status = 200, $beautify = true ) 
	{
		if ( !is_array( $data ) )
		{
			throw new CCException( "CCResponse::json - first argument has to be an array." );
		}

		$response = new static( CCJson::encode( $data, $beautify ), $status );
		$response->header( 'Content-Type', 'text/json' );

		return $response;
	}
public static function json ( $ data = array ( ) , $ status = 200 , $ beautify = true ) { if ( ! is_array ( $ data ) ) { throw new CCException ( "CCResponse::json - first argument has to be an array." ) ; } $ response = new static ( CCJson :: encode ( $ data , $ beautify ) , $ status ) ; $ response -> header ( 'Content-Type' , 'text/json' ) ; return $ response ; }
json response
you can pass an array of data wich will be converted to json

@param array 			$data
@param int			$status
@param bool 			$beautify	should the json output be formatted?
@return CCResponse
json response you can pass an array of data wich will be converted to json