protected function jsonResponse($json)
    {
        $this->set('json', $json);
        $this->viewBuilder()->setLayout(false);
        $this->addCorsHeaders();
        $this->response = $this->response->withType('json');
    }