aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/json
diff options
context:
space:
mode:
authorArslan Urtashev <urtashev@gmail.com>2022-02-10 16:48:55 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:55 +0300
commit1136f2ce7cce7bcc84e695272c0d92d4eb900c2b (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/json
parentb97740540e7302cec9efa181e106ae1990a0cc1c (diff)
downloadydb-1136f2ce7cce7bcc84e695272c0d92d4eb900c2b.tar.gz
Restoring authorship annotation for Arslan Urtashev <urtashev@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/json')
-rw-r--r--library/cpp/json/writer/json.cpp2
-rw-r--r--library/cpp/json/writer/json.h8
-rw-r--r--library/cpp/json/writer/json_ut.cpp14
-rw-r--r--library/cpp/json/yson/json2yson.cpp4
-rw-r--r--library/cpp/json/yson/json2yson.h14
5 files changed, 21 insertions, 21 deletions
diff --git a/library/cpp/json/writer/json.cpp b/library/cpp/json/writer/json.cpp
index 1a8e44e757..02370c2d79 100644
--- a/library/cpp/json/writer/json.cpp
+++ b/library/cpp/json/writer/json.cpp
@@ -188,7 +188,7 @@ namespace NJsonWriter {
RawWriteChar(':');
return TAfterColonContext(*this);
}
-
+
TBuf& TBuf::EndList() {
CheckAndPop(JE_LIST);
EndValue();
diff --git a/library/cpp/json/writer/json.h b/library/cpp/json/writer/json.h
index 80a09de607..0aae2531b9 100644
--- a/library/cpp/json/writer/json.h
+++ b/library/cpp/json/writer/json.h
@@ -60,7 +60,7 @@ namespace NJsonWriter {
TPairContext BeginObject();
TAfterColonContext WriteKey(const TStringBuf& key, EHtmlEscapeMode hem);
TAfterColonContext WriteKey(const TStringBuf& key);
- TAfterColonContext UnsafeWriteKey(const TStringBuf& key);
+ TAfterColonContext UnsafeWriteKey(const TStringBuf& key);
bool KeyExpected() const {
return Stack.back() == JE_OBJECT;
}
@@ -227,9 +227,9 @@ namespace NJsonWriter {
TAfterColonContext WriteKey(const TStringBuf& s) {
return Buf.WriteKey(s);
}
- TAfterColonContext UnsafeWriteKey(const TStringBuf& s) {
- return Buf.UnsafeWriteKey(s);
- }
+ TAfterColonContext UnsafeWriteKey(const TStringBuf& s) {
+ return Buf.UnsafeWriteKey(s);
+ }
TAfterColonContext CompatWriteKeyWithoutQuotes(const TStringBuf& s) {
return Buf.CompatWriteKeyWithoutQuotes(s);
}
diff --git a/library/cpp/json/writer/json_ut.cpp b/library/cpp/json/writer/json_ut.cpp
index c278b6f73c..9980555683 100644
--- a/library/cpp/json/writer/json_ut.cpp
+++ b/library/cpp/json/writer/json_ut.cpp
@@ -252,18 +252,18 @@ Y_UNIT_TEST_SUITE(JsonWriter) {
UNIT_ASSERT_STRINGS_EQUAL(buf.Str(), R"raw_json({"nanvalue":"nan","infvalue":"inf","minus_infvalue":"-inf","l":["nan"]})raw_json");
}
-
- {
- NJsonWriter::TBuf buf;
- buf.BeginObject()
+
+ {
+ NJsonWriter::TBuf buf;
+ buf.BeginObject()
.WriteKey("<>&")
.WriteString("Ololo")
.UnsafeWriteKey("<>&")
.WriteString("Ololo2")
.EndObject();
-
- UNIT_ASSERT_STRINGS_EQUAL(buf.Str(), R"({"\u003C\u003E&":"Ololo","<>&":"Ololo2"})");
- }
+
+ UNIT_ASSERT_STRINGS_EQUAL(buf.Str(), R"({"\u003C\u003E&":"Ololo","<>&":"Ololo2"})");
+ }
}
Y_UNIT_TEST(WriteUninitializedBoolDoesntCrashProgram) {
diff --git a/library/cpp/json/yson/json2yson.cpp b/library/cpp/json/yson/json2yson.cpp
index 53f4c9bf18..f72cb7a9ef 100644
--- a/library/cpp/json/yson/json2yson.cpp
+++ b/library/cpp/json/yson/json2yson.cpp
@@ -93,11 +93,11 @@ namespace NJson2Yson {
NYson::TYsonParser ysonParser(&writer, inputStream, ::NYson::EYsonType::Node);
ysonParser.Parse();
}
-
+
void ConvertYson2Json(TStringBuf yson, IOutputStream* outputStream) {
TMemoryInput inputStream(yson);
ConvertYson2Json(&inputStream, outputStream);
- }
+ }
TString ConvertYson2Json(TStringBuf yson) {
TString json;
diff --git a/library/cpp/json/yson/json2yson.h b/library/cpp/json/yson/json2yson.h
index b0d127a1a2..758eb6d0cf 100644
--- a/library/cpp/json/yson/json2yson.h
+++ b/library/cpp/json/yson/json2yson.h
@@ -7,7 +7,7 @@
namespace NJson2Yson {
class TJsonBuilderImpl: public NYson::TYsonConsumerBase {
public:
- TJsonBuilderImpl(NJson::TJsonCallbacks* parserCallbacks)
+ TJsonBuilderImpl(NJson::TJsonCallbacks* parserCallbacks)
: ParserCallbacks_(parserCallbacks)
{
}
@@ -66,15 +66,15 @@ namespace NJson2Yson {
}
private:
- NJson::TJsonCallbacks* ParserCallbacks_;
+ NJson::TJsonCallbacks* ParserCallbacks_;
};
template <typename TBase>
class TSkipAttributesProxy: public TBase {
public:
- template <typename... TArgs>
- TSkipAttributesProxy<TBase>(TArgs&&... args)
- : TBase(std::forward<TArgs>(args)...)
+ template <typename... TArgs>
+ TSkipAttributesProxy<TBase>(TArgs&&... args)
+ : TBase(std::forward<TArgs>(args)...)
{
}
@@ -156,7 +156,7 @@ namespace NJson2Yson {
void OnEndAttributes() override {
--AttributesDepth;
- Y_ASSERT(AttributesDepth >= 0);
+ Y_ASSERT(AttributesDepth >= 0);
}
private:
@@ -168,7 +168,7 @@ namespace NJson2Yson {
void ConvertYson2Json(IInputStream* inputStream, IOutputStream* outputStream);
void ConvertYson2Json(TStringBuf yson, IOutputStream* outputStream);
TString ConvertYson2Json(TStringBuf yson);
-
+
bool DeserializeYsonAsJsonValue(IInputStream* inputStream, NJson::TJsonValue* outputValue, bool throwOnError = false);
bool DeserializeYsonAsJsonValue(TStringBuf str, NJson::TJsonValue* outputValue, bool throwOnError = false);