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

Function makeNamesValidJSONStrings

src/Formats/JSONUtils.cpp:556–574  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

554 }
555
556 Strings makeNamesValidJSONStrings(const Strings & names, const FormatSettings & settings, bool validate_utf8)
557 {
558 Strings result;
559 result.reserve(names.size());
560 for (const auto & name : names)
561 {
562 WriteBufferFromOwnString buf;
563 if (validate_utf8)
564 {
565 WriteBufferValidUTF8 validating_buf(buf);
566 writeJSONString(name, validating_buf, settings);
567 }
568 else
569 writeJSONString(name, buf, settings);
570
571 result.push_back(buf.str().substr(1, buf.str().size() - 2));
572 }
573 return result;
574 }
575
576 void skipColon(ReadBuffer & in)
577 {

Callers 5

writeLineMethod · 0.85
writePrefixMethod · 0.85
JSONRowOutputFormatMethod · 0.85

Calls 5

writeJSONStringFunction · 0.85
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected