diff options
author | Daniil Cherednik <dcherednik@ydb.tech> | 2023-10-23 20:34:16 +0000 |
---|---|---|
committer | Daniil Cherednik <dcherednik@ydb.tech> | 2023-10-23 20:34:16 +0000 |
commit | e84c813452e9ed62415b2d17a117008fce909a3d (patch) | |
tree | 998632d6f08419de5b644940799f3be9408ab46b /library/cpp/protobuf/json/json2proto.h | |
parent | df6e99640a1489cde9b7cc5b58a3747c6ec28921 (diff) | |
download | ydb-stable-23-3.tar.gz |
Intermediate changesstable-23-3
x-stable-origin-commit: 8b96eef194d7fb3b315816b97322e8dd90bf3d94
Diffstat (limited to 'library/cpp/protobuf/json/json2proto.h')
-rw-r--r-- | library/cpp/protobuf/json/json2proto.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/library/cpp/protobuf/json/json2proto.h b/library/cpp/protobuf/json/json2proto.h index d576fabce7d..5952e28c3dc 100644 --- a/library/cpp/protobuf/json/json2proto.h +++ b/library/cpp/protobuf/json/json2proto.h @@ -2,10 +2,12 @@ #include "string_transform.h" #include "name_generator.h" +#include "unknown_fields_collector.h" #include <library/cpp/json/json_reader.h> #include <library/cpp/json/json_value.h> +#include <util/generic/ptr.h> #include <util/stream/input.h> #include <util/stream/str.h> #include <util/stream/mem.h> @@ -108,6 +110,11 @@ namespace NProtobufJson { return *this; } + TSelf& SetUnknownFieldsCollector(TSimpleSharedPtr<IUnknownFieldsCollector> value) { + UnknownFieldsCollector = std::move(value); + return *this; + } + FldNameMode FieldNameMode = FieldNameOriginalCase; bool AllowUnknownFields = true; @@ -152,6 +159,9 @@ namespace NProtobufJson { /// Allow nonstandard conversions, e.g. google.protobuf.Duration from String bool AllowString2TimeConversion = false; + + /// Stores information about unknown fields + TSimpleSharedPtr<IUnknownFieldsCollector> UnknownFieldsCollector = nullptr; }; /// @throw yexception |