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

Method handleArray

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

Source from the content-addressed store, hash-verified

139
140
141void ParserImpl::handleArray()
142{
143 // Enforce the configured depth limit (set via setDepth) to avoid a native-stack
144 // overflow on deeply nested input. _depth == JSON_UNLIMITED_DEPTH (-1) means no limit.
145 if (_depth != JSON_UNLIMITED_DEPTH && _currentDepth >= _depth)
146 throw JSONException("Maximum allowed JSON depth exceeded");
147 ++_currentDepth;
148
149 json_type tok = json_peek(_pJSON);
150 while (tok != JSON_ARRAY_END && checkError())
151 {
152 handle();
153 tok = json_peek(_pJSON);
154 }
155
156 if (tok == JSON_ARRAY_END) handle();
157 else throw JSONException("JSON array end not found");
158
159 --_currentDepth;
160}
161
162
163void ParserImpl::handleObject()

Callers

nothing calls this directly

Calls 3

json_peekFunction · 0.85
checkErrorFunction · 0.85
handleFunction · 0.85

Tested by

no test coverage detected