diff options
author | familom <familom@yandex-team.ru> | 2022-02-10 16:49:49 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:49 +0300 |
commit | f281aaf77179d27d6208b873e95ae6cd45765a63 (patch) | |
tree | b4229c6ece98c855bd9821ef0b656042c29a8953 /library/cpp/protobuf/json/proto2json.h | |
parent | 53d07fb9e28d179add32cd299c9341bf8a231a31 (diff) | |
download | ydb-f281aaf77179d27d6208b873e95ae6cd45765a63.tar.gz |
Restoring authorship annotation for <familom@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/protobuf/json/proto2json.h')
-rw-r--r-- | library/cpp/protobuf/json/proto2json.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/library/cpp/protobuf/json/proto2json.h b/library/cpp/protobuf/json/proto2json.h index 89a1781a40..7381297b56 100644 --- a/library/cpp/protobuf/json/proto2json.h +++ b/library/cpp/protobuf/json/proto2json.h @@ -1,38 +1,38 @@ -#pragma once - +#pragma once + #include "config.h" #include "json_output.h" - + #include <google/protobuf/descriptor.h> #include <google/protobuf/descriptor.pb.h> #include <google/protobuf/message.h> #include <util/generic/fwd.h> -#include <util/generic/vector.h> +#include <util/generic/vector.h> #include <util/generic/yexception.h> #include <util/stream/str.h> - + #include <functional> - -namespace NJson { + +namespace NJson { class TJsonValue; class TJsonWriter; } - + class IOutputStream; -class TStringStream; - -namespace NProtobufJson { +class TStringStream; + +namespace NProtobufJson { void Proto2Json(const NProtoBuf::Message& proto, IJsonOutput& jsonOutput, const TProto2JsonConfig& config = TProto2JsonConfig(), bool closeMap = true); - + void Proto2Json(const NProtoBuf::Message& proto, NJson::TJsonWriter& writer, const TProto2JsonConfig& config = TProto2JsonConfig()); - + /// @throw yexception void Proto2Json(const NProtoBuf::Message& proto, NJson::TJsonValue& json, const TProto2JsonConfig& config = TProto2JsonConfig()); - + /// @throw yexception void Proto2Json(const NProtoBuf::Message& proto, IOutputStream& out, const TProto2JsonConfig& config); @@ -41,7 +41,7 @@ namespace NProtobufJson { inline void Proto2Json(const T& proto, IOutputStream& out) { out << proto.AsJSON(); } - + // TStringStream deserves a special overload as its operator TString() would cause ambiguity /// @throw yexception void Proto2Json(const NProtoBuf::Message& proto, TStringStream& out, @@ -62,7 +62,7 @@ namespace NProtobufJson { TStringOutput out(str); out << proto.AsJSON(); } - + /// @throw yexception TString Proto2Json(const NProtoBuf::Message& proto, const TProto2JsonConfig& config); @@ -74,5 +74,5 @@ namespace NProtobufJson { Proto2Json(proto, result); return result; } - + } |