ManaPHP\Http\ResponseInterface::setJsonContent PHP Method

setJsonContent() public method

Sets HTTP response body. The parameter is automatically converted to JSON $response->setJsonContent(array("status" => "OK"));
public setJsonContent ( array $content, integer $jsonOptions = null ) : static
$content array
$jsonOptions integer
return static
    public function setJsonContent($content, $jsonOptions = null);