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

Function ReadJson

library/cpp/json/json_reader.cpp:420–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418
419 template <class TRapidJsonCompliantInputStream, class THandler>
420 bool ReadJson(TRapidJsonCompliantInputStream& is, const TJsonReaderConfig* config, THandler& handler, bool throwOnError) {
421 rapidjson::Reader reader;
422
423 auto result = Read(*config, reader, is, handler);
424
425 if (result.IsError()) {
426 if (throwOnError) {
427 ythrow TJsonException() << PrintError(result);
428 } else {
429 return false;
430 }
431 }
432
433 return true;
434 }
435
436 template <class TRapidJsonCompliantInputStream>
437 bool ReadJsonTree(TRapidJsonCompliantInputStream& is, const TJsonReaderConfig* config, TJsonValue* out, bool throwOnError) {

Callers 3

PrettifyMethod · 0.70
ReadJsonTreeFunction · 0.70
ValidateJsonFunction · 0.70

Calls 6

ReadFunction · 0.70
PrintErrorFunction · 0.70
IsErrorMethod · 0.45
OnErrorMethod · 0.45
OffsetMethod · 0.45
OnEndMethod · 0.45

Tested by

no test coverage detected