MCPcopy Create free account
hub / github.com/apache/impala / SkipObject

Method SkipObject

be/src/exec/json/json-parser.cc:383–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

381
382template<class Stream>
383bool JsonSkipper<Stream>::SkipObject() {
384 DCHECK(s_.Peek() == '{');
385 s_.Take();
386 SkipWhitespace();
387 if (Consume('}')) return true;
388 while (true) {
389 ERROR_IF_FALSE(s_.Peek() == '"', kParseErrorObjectMissName);
390 RETURN_IF_FALSE(SkipString());
391 SkipWhitespace();
392 ERROR_IF_FALSE(Consume(':'), kParseErrorObjectMissColon);
393 SkipWhitespace();
394 RETURN_IF_FALSE(SkipValue());
395 SkipWhitespace();
396 if (Consume(',')) SkipWhitespace();
397 else if (Consume('}')) return true;
398 else ERROR_IF_FALSE(false, kParseErrorObjectMissCommaOrCurlyBracket);
399 }
400}
401
402template<class Stream>
403bool JsonSkipper<Stream>::SkipArray() {

Callers 1

TestSkipMethod · 0.80

Calls 3

SkipWhitespaceClass · 0.85
PeekMethod · 0.45
TakeMethod · 0.45

Tested by 1

TestSkipMethod · 0.64