diff options
author | gennadiy <gennadiy@yandex-team.ru> | 2022-02-10 16:50:24 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:24 +0300 |
commit | ef1186a3ef541b1a1c08c06e9f826d45dddce8b0 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 | |
parent | e14f4b9a73a96b289ce54dd4d3f7818502fde5ce (diff) | |
download | ydb-ef1186a3ef541b1a1c08c06e9f826d45dddce8b0.tar.gz |
Restoring authorship annotation for <gennadiy@yandex-team.ru>. Commit 2 of 2.
-rw-r--r-- | library/cpp/json/json_writer.h | 4 | ||||
-rw-r--r-- | library/cpp/json/writer/json.cpp | 4 | ||||
-rw-r--r-- | library/cpp/json/writer/json.h | 20 |
3 files changed, 14 insertions, 14 deletions
diff --git a/library/cpp/json/json_writer.h b/library/cpp/json/json_writer.h index ab45d25622..c7f5c9499a 100644 --- a/library/cpp/json/json_writer.h +++ b/library/cpp/json/json_writer.h @@ -183,12 +183,12 @@ namespace NJson { void Reset(const NJsonWriter::TBufState& from) { return Buf.Reset(from); } - + void Reset(NJsonWriter::TBufState&& from) { return Buf.Reset(std::move(from)); } }; - + void WriteJson(IOutputStream*, const TJsonValue*, bool formatOutput = false, bool sortkeys = false, bool validateUtf8 = true); TString WriteJson(const TJsonValue*, bool formatOutput = true, bool sortkeys = false, bool validateUtf8 = false); TString WriteJson(const TJsonValue&, bool formatOutput = true, bool sortkeys = false, bool validateUtf8 = false); diff --git a/library/cpp/json/writer/json.cpp b/library/cpp/json/writer/json.cpp index 8ec7ca8c3f..02370c2d79 100644 --- a/library/cpp/json/writer/json.cpp +++ b/library/cpp/json/writer/json.cpp @@ -513,5 +513,5 @@ namespace NJsonWriter { NeedNewline = from.NeedNewline; Stack.swap(from.Stack); } - -} + +} diff --git a/library/cpp/json/writer/json.h b/library/cpp/json/writer/json.h index 411f567fee..0aae2531b9 100644 --- a/library/cpp/json/writer/json.h +++ b/library/cpp/json/writer/json.h @@ -13,7 +13,7 @@ namespace NJson { } namespace NJsonWriter { - enum EJsonEntity : ui8 { + enum EJsonEntity : ui8 { JE_OUTER_SPACE = 1, JE_LIST, JE_OBJECT, @@ -33,12 +33,12 @@ namespace NJsonWriter { class TPairContext; class TAfterColonContext; - struct TBufState { - bool NeedComma; - bool NeedNewline; + struct TBufState { + bool NeedComma; + bool NeedNewline; TVector<EJsonEntity> Stack; - }; - + }; + class TBuf : TNonCopyable { public: TBuf(EHtmlEscapeMode mode = HEM_DONT_ESCAPE_HTML, IOutputStream* stream = nullptr); @@ -120,10 +120,10 @@ namespace NJsonWriter { void UnsafeWriteRawBytes(const TStringBuf& s); void UnsafeWriteRawBytes(const char* c, size_t len); - TBufState State() const; - void Reset(const TBufState& from); - void Reset(TBufState&& from); - + TBufState State() const; + void Reset(const TBufState& from); + void Reset(TBufState&& from); + private: void BeginValue(); void EndValue(); |