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

Method skipObject

base/base/JSON.cpp:352–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350
351
352JSON::Pos JSON::skipObject() const
353{
354 if (!isObject())
355 throw JSONException("JSON: expected {");
356 Pos pos = ptr_begin;
357 ++pos;
358 checkPos(pos);
359 if (*pos == '}')
360 return ++pos;
361
362 while (true)
363 {
364 pos = JSON(pos, ptr_end, level + 1).skipNameValuePair();
365
366 checkPos(pos);
367
368 switch (*pos)
369 {
370 case ',':
371 ++pos;
372 break;
373 case '}':
374 return ++pos;
375 default:
376 throw JSONException(std::string("JSON: expected one of ',}', got ") + *pos);
377 }
378 }
379}
380
381
382JSON::Pos JSON::skipElement() const

Callers

nothing calls this directly

Calls 2

skipNameValuePairMethod · 0.80
JSONClass · 0.70

Tested by

no test coverage detected