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

Function DeserializeYsonAsJsonValue

library/cpp/json/yson/json2yson.cpp:72–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70 }
71
72 bool DeserializeYsonAsJsonValue(IInputStream* inputStream, NJson::TJsonValue* outputValue, bool throwOnError) {
73 NJson::TParserCallbacks parser(*outputValue);
74 NJson2Yson::TJsonBuilder consumer(&parser);
75 NYson::TYsonParser ysonParser(&consumer, inputStream, ::NYson::EYsonType::Node);
76 try {
77 ysonParser.Parse();
78 } catch (...) {
79 if (throwOnError) {
80 throw;
81 }
82 return false;
83 }
84 return true;
85 }
86
87 bool DeserializeYsonAsJsonValue(TStringBuf str, NJson::TJsonValue* outputValue, bool throwOnError) {
88 TMemoryInput inputStream(str);

Callers 1

Y_UNIT_TESTFunction · 0.85

Calls 1

ParseMethod · 0.45

Tested by

no test coverage detected