public function json($data, $jsonp = false)
    {
        $options = 0;
        defined('JSON_UNESCAPED_UNICODE') && $options = JSON_UNESCAPED_UNICODE;
        $content = json_encode($data, $options);

        if ($jsonp && preg_match('/^[$A-Z_][0-9A-Z_$.]*$/i', $this->request['callback']) === 1) {
            $this->setHeader('Content-Type', 'application/javascript');
            $content = $this->request['callback'] . '(' . $content . ')';
        } else {
            $this->setHeader('Content-Type', 'application/json');
        }

        return $this->setContent($content);
    }