diff options
author | Vasily Gerasimov <UgnineSirdis@gmail.com> | 2022-02-10 16:49:09 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:09 +0300 |
commit | 6cdc8f140213c595e4ad38bc3d97fcef1146b8c3 (patch) | |
tree | f69637041e6fed76ebae0c74ae1fa0c4be6ab5b4 /library/cpp/protobuf/json/inline.h | |
parent | e5d4696304c6689379ac7ce334512404d4b7836c (diff) | |
download | ydb-6cdc8f140213c595e4ad38bc3d97fcef1146b8c3.tar.gz |
Restoring authorship annotation for Vasily Gerasimov <UgnineSirdis@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/protobuf/json/inline.h')
-rw-r--r-- | library/cpp/protobuf/json/inline.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/protobuf/json/inline.h b/library/cpp/protobuf/json/inline.h index e2d7bb6ef0..03a4db8101 100644 --- a/library/cpp/protobuf/json/inline.h +++ b/library/cpp/protobuf/json/inline.h @@ -23,10 +23,10 @@ // // 4) And then serialize it to json string with inlining, e.g.: // -// Cout << NProtobufJson::PrintInlined(o, MakeFieldOptionFunctor(this_is_json)) << Endl; -// -// 5) Alternatively you can specify a some more abstract functor for defining raw json fields +// Cout << NProtobufJson::PrintInlined(o, MakeFieldOptionFunctor(this_is_json)) << Endl; // +// 5) Alternatively you can specify a some more abstract functor for defining raw json fields +// // which will print following json to stdout: // {"A":{"inner":"value"}} // instead of @@ -35,17 +35,17 @@ // // See ut/inline_ut.cpp for additional examples of usage. -#include "config.h" -#include "proto2json_printer.h" -#include "json_output_create.h" +#include "config.h" +#include "proto2json_printer.h" +#include "json_output_create.h" #include <library/cpp/protobuf/util/simple_reflection.h> -#include <util/generic/maybe.h> -#include <util/generic/yexception.h> -#include <util/generic/utility.h> +#include <util/generic/maybe.h> +#include <util/generic/yexception.h> +#include <util/generic/utility.h> -#include <functional> +#include <functional> namespace NProtobufJson { template <typename TBasePrinter = TProto2JsonPrinter> // TBasePrinter is assumed to be a TProto2JsonPrinter descendant @@ -100,7 +100,7 @@ namespace NProtobufJson { private: TFieldPredicate IsInlined; }; - + inline void PrintInlined(const NProtoBuf::Message& msg, TInliningPrinter<>::TFieldPredicate isInlined, IJsonOutput& output, const TProto2JsonConfig& config = TProto2JsonConfig()) { TInliningPrinter<> printer(std::move(isInlined), config); printer.Print(msg, output); |