diff options
author | Brendan McCarthy <brendan@oddsoftware.net> | 2017-03-17 22:47:38 +1000 |
---|---|---|
committer | Brendan McCarthy <brendan@oddsoftware.net> | 2017-03-17 22:47:38 +1000 |
commit | 89eb4e51b24f7417224b47faf32503d11b6b1bc0 (patch) | |
tree | 1421c70b8eac263f872de8b37f036c3c60108541 /src/google/protobuf/util/internal/protostream_objectsource.h | |
parent | 1eee3202fce4953a9c0c3adbf357ed10bd71e01e (diff) | |
download | protobuf-89eb4e51b24f7417224b47faf32503d11b6b1bc0.tar.gz protobuf-89eb4e51b24f7417224b47faf32503d11b6b1bc0.tar.bz2 protobuf-89eb4e51b24f7417224b47faf32503d11b6b1bc0.zip |
Add option to preserve original proto field names
Diffstat (limited to 'src/google/protobuf/util/internal/protostream_objectsource.h')
-rw-r--r-- | src/google/protobuf/util/internal/protostream_objectsource.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/google/protobuf/util/internal/protostream_objectsource.h b/src/google/protobuf/util/internal/protostream_objectsource.h index 63d5f455..5f443d9d 100644 --- a/src/google/protobuf/util/internal/protostream_objectsource.h +++ b/src/google/protobuf/util/internal/protostream_objectsource.h @@ -116,6 +116,11 @@ class LIBPROTOBUF_EXPORT ProtoStreamObjectSource : public ObjectSource { use_ints_for_enums_ = value; } + // Sets whether to use original proto field names + void set_preserve_proto_field_names(bool value) { + preserve_proto_field_names_ = value; + } + // Sets the max recursion depth of proto message to be deserialized. Proto // messages over this depth will fail to be deserialized. // Default value is 64. @@ -294,6 +299,9 @@ class LIBPROTOBUF_EXPORT ProtoStreamObjectSource : public ObjectSource { // Whether to render enums as ints always. Defaults to false. bool use_ints_for_enums_; + // Whether to preserve proto field names + bool preserve_proto_field_names_; + // Tracks current recursion depth. mutable int recursion_depth_; |