diff options
author | Arslan Urtashev <urtashev@gmail.com> | 2022-02-10 16:48:55 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:55 +0300 |
commit | b97740540e7302cec9efa181e106ae1990a0cc1c (patch) | |
tree | 1a2a0bfe523c3272d207e2d75254a41d3945a3bb /library/cpp/json/writer | |
parent | 31789673dc3562bc7540e00fe031ba84ae282c24 (diff) | |
download | ydb-b97740540e7302cec9efa181e106ae1990a0cc1c.tar.gz |
Restoring authorship annotation for Arslan Urtashev <urtashev@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/json/writer')
-rw-r--r-- | library/cpp/json/writer/json.cpp | 2 | ||||
-rw-r--r-- | library/cpp/json/writer/json.h | 8 | ||||
-rw-r--r-- | library/cpp/json/writer/json_ut.cpp | 14 |
3 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/json/writer/json.cpp b/library/cpp/json/writer/json.cpp index 02370c2d79..1a8e44e757 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 0aae2531b9..80a09de607 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 9980555683..c278b6f73c 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) { |