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
commit32adcdda2e93711f78ed34cab6fad0a1566cb666 (patch)
tree5d5fcd50a94faf2601d4e490e911c9cbb3d56578
parent703a40625ba487ccefdf4d3e74690619588f1cae (diff)
downloadydb-32adcdda2e93711f78ed34cab6fad0a1566cb666.tar.gz
Restoring authorship annotation for <skorodumov-s@yandex-team.ru>. Commit 1 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 072c8deafe..6585b8821b 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 b673788330..1d68231d90 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);
}