aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/util/internal/protostream_objectwriter.h
diff options
context:
space:
mode:
authorFeng Xiao <xiaofeng@google.com>2016-07-01 15:43:37 -0700
committerGitHub <noreply@github.com>2016-07-01 15:43:37 -0700
commitcae3b0cbb689d0ed1e5da73942a5a9705f3411b0 (patch)
tree855f5c2c2d2dd82715145401ed68d20ff025693c /src/google/protobuf/util/internal/protostream_objectwriter.h
parent02b55d248f2fa9f24905201d1ba16a79dd20fdc8 (diff)
parent31999a3f95d8ec9f93b56b0966e2895c5205da53 (diff)
downloadprotobuf-cae3b0cbb689d0ed1e5da73942a5a9705f3411b0.tar.gz
protobuf-cae3b0cbb689d0ed1e5da73942a5a9705f3411b0.tar.bz2
protobuf-cae3b0cbb689d0ed1e5da73942a5a9705f3411b0.zip
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.h')
-rw-r--r--src/google/protobuf/util/internal/protostream_objectwriter.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/google/protobuf/util/internal/protostream_objectwriter.h b/src/google/protobuf/util/internal/protostream_objectwriter.h
index 75e3d67d..2e4d14d1 100644
--- a/src/google/protobuf/util/internal/protostream_objectwriter.h
+++ b/src/google/protobuf/util/internal/protostream_objectwriter.h
@@ -83,7 +83,12 @@ class LIBPROTOBUF_EXPORT ProtoStreamObjectWriter : public ProtoWriter {
// preserve integer precision.
bool struct_integers_as_strings;
- Options() : struct_integers_as_strings(false) {}
+ // Not treat unknown fields as an error. If there is an unknown fields,
+ // just ignore it and continue to process the rest.
+ bool ignore_unknown_fields;
+
+ Options()
+ : struct_integers_as_strings(false), ignore_unknown_fields(false) {}
// Default instance of Options with all options set to defaults.
static const Options& Defaults() {