diff options
author | bbiff <bbiff@yandex-team.com> | 2022-09-11 00:15:54 +0300 |
---|---|---|
committer | bbiff <bbiff@yandex-team.com> | 2022-09-11 00:15:54 +0300 |
commit | 67576a8962c2506b8ee10da48dffba311acb0042 (patch) | |
tree | 51a695bbddbb9be4e5a0cc5c7ec558ca233c2be5 /library/cpp/protobuf/json/json2proto.h | |
parent | a8945929eb162f6910b228697c3d2db3b7cb2ca9 (diff) | |
download | ydb-67576a8962c2506b8ee10da48dffba311acb0042.tar.gz |
support duration and timestamp as string in json2proto
Diffstat (limited to 'library/cpp/protobuf/json/json2proto.h')
-rw-r--r-- | library/cpp/protobuf/json/json2proto.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/library/cpp/protobuf/json/json2proto.h b/library/cpp/protobuf/json/json2proto.h index 4c33498dfa..ed89c6cf63 100644 --- a/library/cpp/protobuf/json/json2proto.h +++ b/library/cpp/protobuf/json/json2proto.h @@ -103,6 +103,11 @@ namespace NProtobufJson { return *this; } + TSelf& SetAllowString2TimeConversion(bool value) { + AllowString2TimeConversion = value; + return *this; + } + FldNameMode FieldNameMode = FieldNameOriginalCase; bool AllowUnknownFields = true; @@ -144,6 +149,9 @@ namespace NProtobufJson { /// Allow js-style comments (both // and /**/) bool AllowComments = false; + + /// Allow nonstandard conversions, e.g. google.protobuf.Duration from String + bool AllowString2TimeConversion = false; }; /// @throw yexception |