MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / handleObject

Method handleObject

base/poco/JSON/src/ParserImpl.cpp:163–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161
162
163void ParserImpl::handleObject()
164{
165 if (_depth != JSON_UNLIMITED_DEPTH && _currentDepth >= _depth)
166 throw JSONException("Maximum allowed JSON depth exceeded");
167 ++_currentDepth;
168
169 json_type tok = json_peek(_pJSON);
170 while (tok != JSON_OBJECT_END && checkError())
171 {
172 json_next(_pJSON);
173 size_t length;
174 const char * bytes = json_get_string(_pJSON, &length);
175 if (_pHandler) _pHandler->key(std::string(bytes, length));
176 handle();
177 tok = json_peek(_pJSON);
178 }
179
180 if (tok == JSON_OBJECT_END) handle();
181 else throw JSONException("JSON object end not found");
182
183 --_currentDepth;
184}
185
186
187void ParserImpl::handle()

Callers

nothing calls this directly

Calls 6

json_peekFunction · 0.85
checkErrorFunction · 0.85
json_nextFunction · 0.85
json_get_stringFunction · 0.85
handleFunction · 0.85
keyMethod · 0.45

Tested by

no test coverage detected