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/yson | |
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/yson')
-rw-r--r-- | library/cpp/json/yson/json2yson.cpp | 4 | ||||
-rw-r--r-- | library/cpp/json/yson/json2yson.h | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/library/cpp/json/yson/json2yson.cpp b/library/cpp/json/yson/json2yson.cpp index f72cb7a9ef..53f4c9bf18 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 758eb6d0cf..b0d127a1a2 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); |