aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskorodumov-s <skorodumov-s@yandex-team.ru>2022-02-10 16:50:21 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:21 +0300
commit637f9eb7adbfc59aaf67eb02ff355478430f5c07 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8
parent32adcdda2e93711f78ed34cab6fad0a1566cb666 (diff)
downloadydb-637f9eb7adbfc59aaf67eb02ff355478430f5c07.tar.gz
Restoring authorship annotation for <skorodumov-s@yandex-team.ru>. Commit 2 of 2.
-rw-r--r--library/cpp/json/json_reader.cpp26
-rw-r--r--library/cpp/json/json_reader.h10
2 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/json/json_reader.cpp b/library/cpp/json/json_reader.cpp
index 6585b8821b..072c8deafe 100644
--- a/library/cpp/json/json_reader.cpp
+++ b/library/cpp/json/json_reader.cpp
@@ -67,10 +67,10 @@ namespace NJson {
return true;
}
- TParserCallbacks::TParserCallbacks(TJsonValue& value, bool throwOnError, bool notClosedBracketIsError)
+ TParserCallbacks::TParserCallbacks(TJsonValue& value, bool throwOnError, bool notClosedBracketIsError)
: TJsonCallbacks(throwOnError)
, Value(value)
- , NotClosedBracketIsError(notClosedBracketIsError)
+ , NotClosedBracketIsError(notClosedBracketIsError)
, CurrentState(START)
{
}
@@ -133,13 +133,13 @@ namespace NJson {
return true;
}
- bool TParserCallbacks::OnEnd() {
- if (NotClosedBracketIsError){
- return ValuesStack.empty();
- }
- return true;
- }
-
+ bool TParserCallbacks::OnEnd() {
+ if (NotClosedBracketIsError){
+ return ValuesStack.empty();
+ }
+ return true;
+ }
+
TJsonReaderConfig::TJsonReaderConfig()
: BufferSize(DEFAULT_BUFFER_LEN)
{
@@ -416,16 +416,16 @@ namespace NJson {
return ReadJsonTreeImpl(in, config, out, throwOnError);
}
- bool ReadJsonFastTree(TStringBuf in, TJsonValue* out, bool throwOnError, bool notClosedBracketIsError) {
- TParserCallbacks cb(*out, throwOnError, notClosedBracketIsError);
+ bool ReadJsonFastTree(TStringBuf in, TJsonValue* out, bool throwOnError, bool notClosedBracketIsError) {
+ TParserCallbacks cb(*out, throwOnError, notClosedBracketIsError);
return ReadJsonFast(in, &cb);
}
- TJsonValue ReadJsonFastTree(TStringBuf in, bool notClosedBracketIsError) {
+ TJsonValue ReadJsonFastTree(TStringBuf in, bool notClosedBracketIsError) {
TJsonValue value;
// There is no way to report an error apart from throwing an exception when we return result by value.
- ReadJsonFastTree(in, &value, /* throwOnError = */ true, notClosedBracketIsError);
+ ReadJsonFastTree(in, &value, /* throwOnError = */ true, notClosedBracketIsError);
return value;
}
diff --git a/library/cpp/json/json_reader.h b/library/cpp/json/json_reader.h
index 1d68231d90..b673788330 100644
--- a/library/cpp/json/json_reader.h
+++ b/library/cpp/json/json_reader.h
@@ -80,7 +80,7 @@ namespace NJson {
class TParserCallbacks: public TJsonCallbacks {
public:
- TParserCallbacks(TJsonValue& value, bool throwOnError = false, bool notClosedBracketIsError = false);
+ TParserCallbacks(TJsonValue& value, bool throwOnError = false, bool notClosedBracketIsError = false);
bool OnNull() override;
bool OnBoolean(bool val) override;
bool OnInteger(long long val) override;
@@ -92,13 +92,13 @@ namespace NJson {
bool OnOpenMap() override;
bool OnCloseMap() override;
bool OnMapKey(const TStringBuf& val) override;
- bool OnEnd() override;
+ bool OnEnd() override;
protected:
TJsonValue& Value;
TString Key;
TVector<TJsonValue*> ValuesStack;
- bool NotClosedBracketIsError;
+ bool NotClosedBracketIsError;
enum {
START,
@@ -135,6 +135,6 @@ namespace NJson {
};
//// relaxed json, used in library/cpp/scheme
- bool ReadJsonFastTree(TStringBuf in, TJsonValue* out, bool throwOnError = false, bool notClosedBracketIsError = false);
- TJsonValue ReadJsonFastTree(TStringBuf in, bool notClosedBracketIsError = false);
+ bool ReadJsonFastTree(TStringBuf in, TJsonValue* out, bool throwOnError = false, bool notClosedBracketIsError = false);
+ TJsonValue ReadJsonFastTree(TStringBuf in, bool notClosedBracketIsError = false);
}