aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/json
diff options
context:
space:
mode:
authordanlark <danlark@yandex-team.ru>2022-02-10 16:46:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:08 +0300
commit3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (patch)
tree26154e1e9990f1bb4525d3e3fb5b6dac2c2c1da2 /library/cpp/json
parentcb68f224c46a8ee52ac3fdd2a32534b8bb8dc134 (diff)
downloadydb-3426a9bc7f169ae9da54cef557ad2a33f6e8eee0.tar.gz
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/json')
-rw-r--r--library/cpp/json/easy_parse/json_easy_parser.cpp10
-rw-r--r--library/cpp/json/fast_sax/parser.rl66
-rw-r--r--library/cpp/json/fast_sax/unescape.cpp2
-rw-r--r--library/cpp/json/flex_buffers/cvt.cpp6
-rw-r--r--library/cpp/json/json_prettifier.cpp2
-rw-r--r--library/cpp/json/json_reader.h2
-rw-r--r--library/cpp/json/rapidjson_helpers.h2
-rw-r--r--library/cpp/json/ut/json_reader_fast_ut.cpp14
-rw-r--r--library/cpp/json/writer/json.cpp2
9 files changed, 23 insertions, 23 deletions
diff --git a/library/cpp/json/easy_parse/json_easy_parser.cpp b/library/cpp/json/easy_parse/json_easy_parser.cpp
index 3c781f544b..c2193ea553 100644
--- a/library/cpp/json/easy_parse/json_easy_parser.cpp
+++ b/library/cpp/json/easy_parse/json_easy_parser.cpp
@@ -66,7 +66,7 @@ namespace NJson {
bool CheckFilter(const TVector<TPathElem>& path) const {
if (Stack.size() < path.size())
return false;
- for (size_t n = 0; n < path.size(); ++n) {
+ for (size_t n = 0; n < path.size(); ++n) {
if (!PathElementMatch(path[n], Stack[n]))
return false;
}
@@ -74,7 +74,7 @@ namespace NJson {
}
void UpdateRule() {
- for (size_t n = 0; n < Parent.Fields.size(); ++n) {
+ for (size_t n = 0; n < Parent.Fields.size(); ++n) {
if (FieldValues[n].empty() && CheckFilter(Parent.Fields[n].Path)) {
CurrentFieldIdx = n;
return;
@@ -113,7 +113,7 @@ namespace NJson {
, CurrentFieldIdx(-1)
, HasFormatError(false)
{
- for (size_t n = 0; n < Parent.Fields.size(); ++n) {
+ for (size_t n = 0; n < Parent.Fields.size(); ++n) {
if (!Parent.Fields[n].Path.empty() && Parent.Fields[n].Path.back().Type == NImpl::ARRAY)
ShouldUpdateOnArrayChange = true;
}
@@ -187,14 +187,14 @@ namespace NJson {
bool IsOK() const {
if (HasFormatError)
return false;
- for (size_t n = 0; n < FieldValues.size(); ++n)
+ for (size_t n = 0; n < FieldValues.size(); ++n)
if (Parent.Fields[n].NonEmpty && FieldValues[n].empty())
return false;
return true;
}
void WriteTo(IOutputStream& out) const {
- for (size_t n = 0; n < FieldValues.size(); ++n)
+ for (size_t n = 0; n < FieldValues.size(); ++n)
out << "\t" << FieldValues[n];
}
diff --git a/library/cpp/json/fast_sax/parser.rl6 b/library/cpp/json/fast_sax/parser.rl6
index edb4e9ee1b..ef3cfb5110 100644
--- a/library/cpp/json/fast_sax/parser.rl6
+++ b/library/cpp/json/fast_sax/parser.rl6
@@ -31,8 +31,8 @@ struct TParserCtx {
TParserCtx(TJsonCallbacks& h, TStringBuf data)
: Hndl(h)
- , p0(data.data())
- , p(data.data())
+ , p0(data.data())
+ , p(data.data())
, pe(data.end())
, eof(data.end())
{}
@@ -145,7 +145,7 @@ struct TParserCtx {
Buffer.Clear();
Buffer.Reserve(2 * (te - ts));
- return OnString(UnescapeJsonUnicode(TStringBuf(ts + 1, te - ts - 2), Buffer.data()), SS_MUSTCOPY);
+ return OnString(UnescapeJsonUnicode(TStringBuf(ts + 1, te - ts - 2), Buffer.data()), SS_MUSTCOPY);
}
bool OnMapClose() {
diff --git a/library/cpp/json/fast_sax/unescape.cpp b/library/cpp/json/fast_sax/unescape.cpp
index 72109b0b5e..bf07db23dd 100644
--- a/library/cpp/json/fast_sax/unescape.cpp
+++ b/library/cpp/json/fast_sax/unescape.cpp
@@ -3,5 +3,5 @@
#include <util/string/escape.h>
TStringBuf UnescapeJsonUnicode(TStringBuf data, char* scratch) {
- return TStringBuf(scratch, UnescapeC(data.data(), data.size(), scratch));
+ return TStringBuf(scratch, UnescapeC(data.data(), data.size(), scratch));
}
diff --git a/library/cpp/json/flex_buffers/cvt.cpp b/library/cpp/json/flex_buffers/cvt.cpp
index fee0cea0b8..399871bf68 100644
--- a/library/cpp/json/flex_buffers/cvt.cpp
+++ b/library/cpp/json/flex_buffers/cvt.cpp
@@ -50,7 +50,7 @@ namespace {
}
bool OnString(const TStringBuf& v) override {
- B.String(v.data(), v.size());
+ B.String(v.data(), v.size());
return true;
}
@@ -64,7 +64,7 @@ namespace {
bool OnMapKey(const TStringBuf& v) override {
auto iv = P.AppendCString(v);
- B.Key(iv.data(), iv.size());
+ B.Key(iv.data(), iv.size());
return true;
}
@@ -133,7 +133,7 @@ void NJson::ConvertJsonToFlexBuffers(TStringBuf input, TFlexBuffersData& result)
}
TString NJson::FlexToString(const TFlexBuffersData& v) {
- auto root = flexbuffers::GetRoot(v.data(), v.size());
+ auto root = flexbuffers::GetRoot(v.data(), v.size());
return TString(root.ToString());
}
diff --git a/library/cpp/json/json_prettifier.cpp b/library/cpp/json/json_prettifier.cpp
index bb16aab44e..705773dd14 100644
--- a/library/cpp/json/json_prettifier.cpp
+++ b/library/cpp/json/json_prettifier.cpp
@@ -260,7 +260,7 @@ namespace NJson {
bool TJsonPrettifier::Prettify(TStringBuf in, IOutputStream& out) const {
TPrettifier p(out, *this);
if (Strict) {
- TMemoryInput mIn(in.data(), in.size());
+ TMemoryInput mIn(in.data(), in.size());
return ReadJson(&mIn, &p);
} else {
return ReadJsonFast(in, &p);
diff --git a/library/cpp/json/json_reader.h b/library/cpp/json/json_reader.h
index b673788330..10ff3b543b 100644
--- a/library/cpp/json/json_reader.h
+++ b/library/cpp/json/json_reader.h
@@ -66,7 +66,7 @@ namespace NJson {
}
inline bool ValidateJson(TStringBuf in, const TJsonReaderConfig& config = TJsonReaderConfig(), bool throwOnError = false) {
- TMemoryInput min(in.data(), in.size());
+ TMemoryInput min(in.data(), in.size());
return ValidateJson(&min, &config, throwOnError);
}
diff --git a/library/cpp/json/rapidjson_helpers.h b/library/cpp/json/rapidjson_helpers.h
index aeb96ff670..92cb86d1e1 100644
--- a/library/cpp/json/rapidjson_helpers.h
+++ b/library/cpp/json/rapidjson_helpers.h
@@ -79,7 +79,7 @@ namespace NJson {
struct TStringBufStreamWrapper : TReadOnlyStreamBase {
Ch Peek() const {
- return Pos < Data.size() ? Data[Pos] : 0;
+ return Pos < Data.size() ? Data[Pos] : 0;
}
Ch Take() {
diff --git a/library/cpp/json/ut/json_reader_fast_ut.cpp b/library/cpp/json/ut/json_reader_fast_ut.cpp
index 60dffc91c7..4c551ec853 100644
--- a/library/cpp/json/ut/json_reader_fast_ut.cpp
+++ b/library/cpp/json/ut/json_reader_fast_ut.cpp
@@ -59,7 +59,7 @@ namespace NJson {
default:
return "YOUFAILED";
case E_ERROR:
- return Sprintf("error: %s", Str.data());
+ return Sprintf("error: %s", Str.data());
case E_DICT_OPEN:
return "{";
case E_DICT_CLOSE:
@@ -77,9 +77,9 @@ namespace NJson {
case E_FLT:
return ::ToString(DNum);
case E_STR:
- return Sprintf("%s", Str.data());
+ return Sprintf("%s", Str.data());
case E_KEY:
- return Sprintf("key: %s", Str.data());
+ return Sprintf("key: %s", Str.data());
}
}
};
@@ -152,10 +152,10 @@ namespace NJson {
UNIT_ASSERT_VALUES_EQUAL_C(e.size(), Events.size(), str);
for (ui32 i = 0, sz = e.size(); i < sz; ++i) {
- UNIT_ASSERT_VALUES_EQUAL_C((int)e[i].Type, (int)Events[i].Type, Sprintf("'%s' %u", str.data(), i));
- UNIT_ASSERT_VALUES_EQUAL_C(e[i].INum, Events[i].INum, Sprintf("'%s' %u", str.data(), i));
- UNIT_ASSERT_VALUES_EQUAL_C(e[i].DNum, Events[i].DNum, Sprintf("'%s' %u", str.data(), i));
- UNIT_ASSERT_VALUES_EQUAL_C(e[i].Str, Events[i].Str, Sprintf("'%s' %u", str.data(), i));
+ UNIT_ASSERT_VALUES_EQUAL_C((int)e[i].Type, (int)Events[i].Type, Sprintf("'%s' %u", str.data(), i));
+ UNIT_ASSERT_VALUES_EQUAL_C(e[i].INum, Events[i].INum, Sprintf("'%s' %u", str.data(), i));
+ UNIT_ASSERT_VALUES_EQUAL_C(e[i].DNum, Events[i].DNum, Sprintf("'%s' %u", str.data(), i));
+ UNIT_ASSERT_VALUES_EQUAL_C(e[i].Str, Events[i].Str, Sprintf("'%s' %u", str.data(), i));
}
} catch (const yexception&) {
Clog << "Exception at '" << str << "'" << Endl;
diff --git a/library/cpp/json/writer/json.cpp b/library/cpp/json/writer/json.cpp
index 02370c2d79..940eaef8c9 100644
--- a/library/cpp/json/writer/json.cpp
+++ b/library/cpp/json/writer/json.cpp
@@ -467,7 +467,7 @@ namespace NJsonWriter {
}
void TBuf::UnsafeWriteRawBytes(const TStringBuf& s) {
- UnsafeWriteRawBytes(s.data(), s.size());
+ UnsafeWriteRawBytes(s.data(), s.size());
}
const TString& TBuf::Str() const {