aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/util/json_util.h
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2017-12-12 15:11:40 -0800
committerGravatar Feng Xiao <xfxyjwf@gmail.com>2017-12-12 15:11:40 -0800
commit6c27550df09d7344c2aba15733f36109d80d00cf (patch)
tree26d4d8a31d488ebb80935569d1bff53ac7fc0853 /src/google/protobuf/util/json_util.h
parent31c54d1289f2ae44158eff631526762366ba1707 (diff)
Clarify default value behavior in JSON conversion.
Make it clear default value is only omitted for proto3.
Diffstat (limited to 'src/google/protobuf/util/json_util.h')
-rw-r--r--src/google/protobuf/util/json_util.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/google/protobuf/util/json_util.h b/src/google/protobuf/util/json_util.h
index dee3ddba..b1c69813 100644
--- a/src/google/protobuf/util/json_util.h
+++ b/src/google/protobuf/util/json_util.h
@@ -56,10 +56,10 @@ struct JsonPrintOptions {
// Whether to add spaces, line breaks and indentation to make the JSON output
// easy to read.
bool add_whitespace;
- // Whether to always print primitive fields. By default primitive fields with
- // default values will be omitted in JSON joutput. For example, an int32 field
- // set to 0 will be omitted. Set this flag to true will override the default
- // behavior and print primitive fields regardless of their values.
+ // Whether to always print primitive fields. By default proto3 primitive
+ // fields with default values will be omitted in JSON output. For example, an
+ // int32 field 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.