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

Function Read

library/cpp/json/json_reader.cpp:390–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388
389 template <class TRapidJsonCompliantInputStream, class THandler>
390 auto Read(const TJsonReaderConfig& config,
391 rapidjson::Reader& reader,
392 TRapidJsonCompliantInputStream& is,
393 THandler& handler) {
394 // validate by default
395 ui8 flags = ReaderConfigFlags::VALIDATE;
396
397 if (config.UseIterativeParser) {
398 flags |= ReaderConfigFlags::ITERATIVE;
399 }
400
401 if (config.AllowComments) {
402 flags |= ReaderConfigFlags::COMMENTS;
403 }
404
405 if (config.DontValidateUtf8) {
406 flags &= ~(ReaderConfigFlags::VALIDATE);
407 }
408
409 if (config.AllowEscapedApostrophe) {
410 flags |= ReaderConfigFlags::ESCAPE;
411 }
412 if (config.AllowReadNanInf) {
413 flags |= ReaderConfigFlags::NANINF;
414 }
415
416 return ReadWithRuntimeFlags(flags, reader, is, handler);
417 }
418
419 template <class TRapidJsonCompliantInputStream, class THandler>
420 bool ReadJson(TRapidJsonCompliantInputStream& is, const TJsonReaderConfig* config, THandler& handler, bool throwOnError) {

Callers 5

ReadJsonFunction · 0.70
ParseMethod · 0.50
DequeueMethod · 0.50
DequeueMethod · 0.50
ReadComplexMethod · 0.50

Calls 1

ReadWithRuntimeFlagsFunction · 0.70

Tested by

no test coverage detected