aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/json
diff options
context:
space:
mode:
authortobo <tobo@yandex-team.ru>2022-02-10 16:47:27 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:27 +0300
commit55a7f90e4cd31e9481cace8ee5dfd682c27e810e (patch)
tree9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/json
parent7fe839092527589b38f014d854c51565b3c1adfa (diff)
downloadydb-55a7f90e4cd31e9481cace8ee5dfd682c27e810e.tar.gz
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/json')
-rw-r--r--library/cpp/json/fast_sax/parser.rl62
-rw-r--r--library/cpp/json/flex_buffers/cvt.cpp30
-rw-r--r--library/cpp/json/json_prettifier.cpp4
-rw-r--r--library/cpp/json/json_reader.cpp6
-rw-r--r--library/cpp/json/writer/json.cpp8
-rw-r--r--library/cpp/json/writer/json_value.cpp2
6 files changed, 26 insertions, 26 deletions
diff --git a/library/cpp/json/fast_sax/parser.rl6 b/library/cpp/json/fast_sax/parser.rl6
index b7280594d2..edb4e9ee1b 100644
--- a/library/cpp/json/fast_sax/parser.rl6
+++ b/library/cpp/json/fast_sax/parser.rl6
@@ -41,7 +41,7 @@ struct TParserCtx {
return b && e && b <= e;
}
- bool OnError(TStringBuf reason = TStringBuf(""), bool end = false) const {
+ bool OnError(TStringBuf reason = TStringBuf(""), bool end = false) const {
size_t off = 0;
TStringBuf token;
diff --git a/library/cpp/json/flex_buffers/cvt.cpp b/library/cpp/json/flex_buffers/cvt.cpp
index c0c8d97edb..fee0cea0b8 100644
--- a/library/cpp/json/flex_buffers/cvt.cpp
+++ b/library/cpp/json/flex_buffers/cvt.cpp
@@ -19,49 +19,49 @@ namespace {
{
}
- bool OnNull() override {
+ bool OnNull() override {
B.Null();
return true;
}
- bool OnBoolean(bool v) override {
+ bool OnBoolean(bool v) override {
B.Bool(v);
return true;
}
- bool OnInteger(long long v) override {
+ bool OnInteger(long long v) override {
B.Int(v);
return true;
}
- bool OnUInteger(unsigned long long v) override {
+ bool OnUInteger(unsigned long long v) override {
B.UInt(v);
return true;
}
- bool OnDouble(double v) override {
+ bool OnDouble(double v) override {
B.Double(v);
return true;
}
- bool OnString(const TStringBuf& v) override {
+ bool OnString(const TStringBuf& v) override {
B.String(v.data(), v.size());
return true;
}
- bool OnOpenMap() override {
+ bool OnOpenMap() override {
S.push_back(B.StartMap());
return true;
}
- bool OnMapKey(const TStringBuf& v) override {
+ bool OnMapKey(const TStringBuf& v) override {
auto iv = P.AppendCString(v);
B.Key(iv.data(), iv.size());
@@ -69,33 +69,33 @@ namespace {
return true;
}
- bool OnCloseMap() override {
+ bool OnCloseMap() override {
B.EndMap(PopOffset());
return true;
}
- bool OnOpenArray() override {
+ bool OnOpenArray() override {
S.push_back(B.StartVector());
return true;
}
- bool OnCloseArray() override {
+ bool OnCloseArray() override {
B.EndVector(PopOffset(), false, false);
return true;
}
- bool OnStringNoCopy(const TStringBuf& s) override {
+ bool OnStringNoCopy(const TStringBuf& s) override {
return OnString(s);
}
- bool OnMapKeyNoCopy(const TStringBuf& s) override {
+ bool OnMapKeyNoCopy(const TStringBuf& s) override {
return OnMapKey(s);
}
- bool OnEnd() override {
+ bool OnEnd() override {
B.Finish();
Y_ENSURE(S.empty());
@@ -103,7 +103,7 @@ namespace {
return true;
}
- void OnError(size_t, TStringBuf reason) override {
+ void OnError(size_t, TStringBuf reason) override {
ythrow yexception() << reason;
}
diff --git a/library/cpp/json/json_prettifier.cpp b/library/cpp/json/json_prettifier.cpp
index e0b5bedf31..bb16aab44e 100644
--- a/library/cpp/json/json_prettifier.cpp
+++ b/library/cpp/json/json_prettifier.cpp
@@ -161,11 +161,11 @@ namespace NJson {
}
bool OnNull() override {
- return WriteVal(TStringBuf("null"));
+ return WriteVal(TStringBuf("null"));
}
bool OnBoolean(bool v) override {
- return WriteVal(v ? TStringBuf("true") : TStringBuf("false"));
+ return WriteVal(v ? TStringBuf("true") : TStringBuf("false"));
}
bool OnInteger(long long i) override {
diff --git a/library/cpp/json/json_reader.cpp b/library/cpp/json/json_reader.cpp
index 8c03656685..072c8deafe 100644
--- a/library/cpp/json/json_reader.cpp
+++ b/library/cpp/json/json_reader.cpp
@@ -14,9 +14,9 @@
namespace NJson {
namespace {
TString PrintError(const rapidjson::ParseResult& result) {
- return TStringBuilder() << TStringBuf("Offset: ") << result.Offset()
- << TStringBuf(", Code: ") << (int)result.Code()
- << TStringBuf(", Error: ") << GetParseError_En(result.Code());
+ return TStringBuilder() << TStringBuf("Offset: ") << result.Offset()
+ << TStringBuf(", Code: ") << (int)result.Code()
+ << TStringBuf(", Error: ") << GetParseError_En(result.Code());
}
}
diff --git a/library/cpp/json/writer/json.cpp b/library/cpp/json/writer/json.cpp
index b5c0d517ea..02370c2d79 100644
--- a/library/cpp/json/writer/json.cpp
+++ b/library/cpp/json/writer/json.cpp
@@ -214,13 +214,13 @@ namespace NJsonWriter {
}
TValueContext TBuf::WriteNull() {
- UnsafeWriteValue(TStringBuf("null"));
+ UnsafeWriteValue(TStringBuf("null"));
return TValueContext(*this);
}
TValueContext TBuf::WriteBool(bool b) {
- constexpr TStringBuf trueVal = "true";
- constexpr TStringBuf falseVal = "false";
+ constexpr TStringBuf trueVal = "true";
+ constexpr TStringBuf falseVal = "false";
UnsafeWriteValue(b ? trueVal : falseVal);
return TValueContext(*this);
}
@@ -323,7 +323,7 @@ namespace NJsonWriter {
#define MATCH(sym, string) \
case sym: \
UnsafeWriteRawBytes(beg, cur - beg); \
- UnsafeWriteRawBytes(TStringBuf(string)); \
+ UnsafeWriteRawBytes(TStringBuf(string)); \
return true
inline bool TBuf::EscapedWriteChar(const char* beg, const char* cur, EHtmlEscapeMode hem) {
diff --git a/library/cpp/json/writer/json_value.cpp b/library/cpp/json/writer/json_value.cpp
index e22f0a0b38..c61e8d1dc4 100644
--- a/library/cpp/json/writer/json_value.cpp
+++ b/library/cpp/json/writer/json_value.cpp
@@ -531,7 +531,7 @@ namespace NJson {
case JSON_NULL:
case JSON_UNDEFINED:
default:
- return false;
+ return false;
case JSON_BOOLEAN:
return Value.Boolean;
}