public function parse($json, $assoc = false, $depth = 512)
    {
        if (null === ($data = json_decode($json, $assoc, $depth))) {
            if (JSON_ERROR_UTF8 === json_last_error()) {
                throw JsonException::invalidUtf8();
            }

            $this->checkSyntax($json);
            // @codeCoverageIgnoreStart
        }
        // @codeCoverageIgnoreEnd

        return $data;
    }