From f281aaf77179d27d6208b873e95ae6cd45765a63 Mon Sep 17 00:00:00 2001 From: familom <familom@yandex-team.ru> Date: Thu, 10 Feb 2022 16:49:49 +0300 Subject: Restoring authorship annotation for <familom@yandex-team.ru>. Commit 1 of 2. --- library/cpp/protobuf/json/proto2json.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'library/cpp/protobuf/json/proto2json.h') 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; } - + } -- cgit v1.2.3