MCPcopy Create free account
hub / github.com/catboost/catboost / Write

Method Write

library/cpp/json/json_writer.cpp:71–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69 }
70
71 void TJsonWriter::Write(const TStringBuf& value) {
72 if (ValidateUtf8 && !IsUtf(value)) {
73 throw yexception() << "JSON writer: invalid UTF-8";
74 }
75 if (Buf.KeyExpected()) {
76 Buf.WriteKey(value);
77 } else {
78 if (DontEscapeStrings) {
79 Buf.UnsafeWriteValue(TString("\"") + value + '"');
80 } else {
81 Buf.WriteString(value);
82 }
83 }
84 }
85
86 void TJsonWriter::WriteNull() {
87 Buf.WriteNull();

Callers 1

WriteJsonFunction · 0.45

Calls 12

IsUtfFunction · 0.85
yexceptionClass · 0.85
KeyExpectedMethod · 0.45
WriteKeyMethod · 0.45
UnsafeWriteValueMethod · 0.45
WriteStringMethod · 0.45
WriteFloatMethod · 0.45
WriteDoubleMethod · 0.45
WriteLongLongMethod · 0.45
WriteULongLongMethod · 0.45
WriteBoolMethod · 0.45
WriteJsonValueMethod · 0.45

Tested by

no test coverage detected