diff options
author | Feng Xiao <xiaofeng@google.com> | 2016-07-01 15:43:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-01 15:43:37 -0700 |
commit | cae3b0cbb689d0ed1e5da73942a5a9705f3411b0 (patch) | |
tree | 855f5c2c2d2dd82715145401ed68d20ff025693c /src/google/protobuf/util/internal/protostream_objectwriter.cc | |
parent | 02b55d248f2fa9f24905201d1ba16a79dd20fdc8 (diff) | |
parent | 31999a3f95d8ec9f93b56b0966e2895c5205da53 (diff) |
Merge pull request #1704 from lizan/json_parse_options
Add JsonParseOptions to ignore unknown fields
Diffstat (limited to 'src/google/protobuf/util/internal/protostream_objectwriter.cc')
-rw-r--r-- | src/google/protobuf/util/internal/protostream_objectwriter.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/google/protobuf/util/internal/protostream_objectwriter.cc b/src/google/protobuf/util/internal/protostream_objectwriter.cc index 8fa58a6f..1825f556 100644 --- a/src/google/protobuf/util/internal/protostream_objectwriter.cc +++ b/src/google/protobuf/util/internal/protostream_objectwriter.cc @@ -63,7 +63,9 @@ ProtoStreamObjectWriter::ProtoStreamObjectWriter( : ProtoWriter(type_resolver, type, output, listener), master_type_(type), current_(NULL), - options_(options) {} + options_(options) { + set_ignore_unknown_fields(options_.ignore_unknown_fields); +} ProtoStreamObjectWriter::ProtoStreamObjectWriter( const TypeInfo* typeinfo, const google::protobuf::Type& type, |