aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/util/json_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/util/json_util.h')
-rw-r--r--src/google/protobuf/util/json_util.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/google/protobuf/util/json_util.h b/src/google/protobuf/util/json_util.h
index 0e45ef81..53b1d1ba 100644
--- a/src/google/protobuf/util/json_util.h
+++ b/src/google/protobuf/util/json_util.h
@@ -61,9 +61,13 @@ struct JsonPrintOptions {
// set to 0 will be omitted. Set this flag to true will override the default
// behavior and print primitive fields regardless of their values.
bool always_print_primitive_fields;
+ // Whether to always print enums as ints. By default they are rendered as
+ // strings.
+ bool always_print_enums_as_ints;
JsonPrintOptions() : add_whitespace(false),
- always_print_primitive_fields(false) {
+ always_print_primitive_fields(false),
+ always_print_enums_as_ints(false) {
}
};