MCPcopy Create free account
hub / github.com/ByConity/ByConity / getString

Method getString

base/common/JSON.cpp:568–658  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

566}
567
568std::string JSON::getString() const
569{
570 Pos s = ptr_begin;
571
572 if (*s != '"')
573 throw JSONException(std::string("JSON: expected \", got ") + *s);
574 ++s;
575 checkPos(s);
576
577 std::string buf;
578 do
579 {
580 Pos p = find_first_symbols<'\\','"'>(s, ptr_end);
581 if (p >= ptr_end)
582 {
583 break;
584 }
585 buf.append(s, p);
586 s = p;
587 switch (*s)
588 {
589 case '\\':
590 ++s;
591 checkPos(s);
592
593 switch (*s)
594 {
595 case '"':
596 buf += '"';
597 break;
598 case '\\':
599 buf += '\\';
600 break;
601 case '/':
602 buf += '/';
603 break;
604 case 'b':
605 buf += '\b';
606 break;
607 case 'f':
608 buf += '\f';
609 break;
610 case 'n':
611 buf += '\n';
612 break;
613 case 'r':
614 buf += '\r';
615 break;
616 case 't':
617 buf += '\t';
618 break;
619 case 'u':
620 {
621 Poco::UTF8Encoding utf8;
622
623 ++s;
624 checkPos(s + 4);
625 std::string hex(s, 4);

Callers 15

reloadConfigurationMethod · 0.45
initializeMethod · 0.45
initializeMethod · 0.45
GraphiteWriterMethod · 0.45
buildLoggersMethod · 0.45
updateLevelsMethod · 0.45
ConnectionParametersMethod · 0.45
initializeMethod · 0.45
mainImplMethod · 0.45
connectMethod · 0.45
promptMethod · 0.45
initBlockOutputStreamMethod · 0.45

Calls 7

to_stringFunction · 0.70
parseHexFunction · 0.50
appendMethod · 0.45
resizeMethod · 0.45
sizeMethod · 0.45
convertMethod · 0.45
dataMethod · 0.45

Tested by 2

initializeMethod · 0.36
mainMethod · 0.36