diff options
author | Ruslan Kovalev <ruslan.a.kovalev@gmail.com> | 2022-02-10 16:46:44 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:44 +0300 |
commit | 59e19371de37995fcb36beb16cd6ec030af960bc (patch) | |
tree | fa68e36093ebff8b805462e9e6d331fe9d348214 /library/cpp/json/json_reader.cpp | |
parent | 89db6fe2fe2c32d2a832ddfeb04e8d078e301084 (diff) | |
download | ydb-59e19371de37995fcb36beb16cd6ec030af960bc.tar.gz |
Restoring authorship annotation for Ruslan Kovalev <ruslan.a.kovalev@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/json/json_reader.cpp')
-rw-r--r-- | library/cpp/json/json_reader.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/json/json_reader.cpp b/library/cpp/json/json_reader.cpp index 072c8deafe..5162280d62 100644 --- a/library/cpp/json/json_reader.cpp +++ b/library/cpp/json/json_reader.cpp @@ -2,24 +2,24 @@ #include "rapidjson_helpers.h" -#include <contrib/libs/rapidjson/include/rapidjson/error/en.h> -#include <contrib/libs/rapidjson/include/rapidjson/error/error.h> +#include <contrib/libs/rapidjson/include/rapidjson/error/en.h> +#include <contrib/libs/rapidjson/include/rapidjson/error/error.h> #include <contrib/libs/rapidjson/include/rapidjson/reader.h> #include <util/generic/stack.h> #include <util/string/cast.h> #include <util/system/yassert.h> -#include <util/string/builder.h> +#include <util/string/builder.h> namespace NJson { - namespace { - TString PrintError(const rapidjson::ParseResult& result) { + namespace { + TString PrintError(const rapidjson::ParseResult& result) { return TStringBuilder() << TStringBuf("Offset: ") << result.Offset() << TStringBuf(", Code: ") << (int)result.Code() << TStringBuf(", Error: ") << GetParseError_En(result.Code()); - } - } - + } + } + static const size_t DEFAULT_BUFFER_LEN = 65536; bool TParserCallbacks::OpenComplexValue(EJsonValueType type) { @@ -355,7 +355,7 @@ namespace NJson { if (result.IsError()) { if (throwOnError) { - ythrow TJsonException() << PrintError(result); + ythrow TJsonException() << PrintError(result); } else { return false; } @@ -538,7 +538,7 @@ namespace NJson { auto result = Read(*config, reader, is, wrapper); if (result.IsError()) { - cbs->OnError(result.Offset(), PrintError(result)); + cbs->OnError(result.Offset(), PrintError(result)); return false; } |