diff options
| author | levanov <[email protected]> | 2022-02-10 16:50:35 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:50:35 +0300 | 
| commit | e286bb0ae13ace8f8efe6aa628c5e1e67708e32e (patch) | |
| tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/protobuf/json/json2proto.h | |
| parent | 45c5374f026a836b0b16ea2d9246c8385d371ca7 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/protobuf/json/json2proto.h')
| -rw-r--r-- | library/cpp/protobuf/json/json2proto.h | 34 | 
1 files changed, 17 insertions, 17 deletions
diff --git a/library/cpp/protobuf/json/json2proto.h b/library/cpp/protobuf/json/json2proto.h index cd9aa70ea3c..4c33498dfa3 100644 --- a/library/cpp/protobuf/json/json2proto.h +++ b/library/cpp/protobuf/json/json2proto.h @@ -30,11 +30,11 @@ namespace NProtobufJson {              FieldNameSnakeCaseDense // ABC -> abc,      UserID -> user_id          }; -        enum EnumValueMode {  -            EnumCaseSensetive = 0, // default  +        enum EnumValueMode { +            EnumCaseSensetive = 0, // default              EnumCaseInsensetive,              EnumSnakeCaseInsensitive -        };  +        };          TSelf& SetFieldNameMode(FldNameMode mode) {              Y_ENSURE(mode == FieldNameOriginalCase || !UseJsonName, "FieldNameMode and UseJsonName are mutually exclusive"); @@ -68,11 +68,11 @@ namespace NProtobufJson {              return *this;          } -        TSelf& SetMapAsObject(bool mapAsObject) {  -            MapAsObject = mapAsObject;  -            return *this;  -        }  -  +        TSelf& SetMapAsObject(bool mapAsObject) { +            MapAsObject = mapAsObject; +            return *this; +        } +          TSelf& SetReplaceRepeatedFields(bool replaceRepeatedFields) {              ReplaceRepeatedFields = replaceRepeatedFields;              return *this; @@ -83,11 +83,11 @@ namespace NProtobufJson {              return *this;          } -        TSelf& SetEnumValueMode(EnumValueMode enumValueMode) {  -            EnumValueMode = enumValueMode;  -            return *this;  -        }  -  +        TSelf& SetEnumValueMode(EnumValueMode enumValueMode) { +            EnumValueMode = enumValueMode; +            return *this; +        } +          TSelf& SetVectorizeScalars(bool vectorizeScalars) {              VectorizeScalars = vectorizeScalars;              return *this; @@ -103,7 +103,7 @@ namespace NProtobufJson {              return *this;          } -        FldNameMode FieldNameMode = FieldNameOriginalCase;  +        FldNameMode FieldNameMode = FieldNameOriginalCase;          bool AllowUnknownFields = true;          /// Use 'json_name' protobuf option for field name, mutually exclusive @@ -132,9 +132,9 @@ namespace NProtobufJson {          /// Custom field names generator.          TNameGenerator NameGenerator = {}; -  -        /// Enum value parsing mode.  -        EnumValueMode EnumValueMode = EnumCaseSensetive;  + +        /// Enum value parsing mode. +        EnumValueMode EnumValueMode = EnumCaseSensetive;          /// Append scalars to repeated fields          bool VectorizeScalars = false;  | 
