Unverified Commit 0a7120ac authored by Feng Xiao's avatar Feng Xiao Committed by GitHub

Merge pull request #4037 from xfxyjwf/issue2880

Clarify default value behavior in JSON conversion.
parents 5ce724bc 6c27550d
...@@ -56,10 +56,10 @@ struct JsonPrintOptions { ...@@ -56,10 +56,10 @@ struct JsonPrintOptions {
// Whether to add spaces, line breaks and indentation to make the JSON output // Whether to add spaces, line breaks and indentation to make the JSON output
// easy to read. // easy to read.
bool add_whitespace; bool add_whitespace;
// Whether to always print primitive fields. By default primitive fields with // Whether to always print primitive fields. By default proto3 primitive
// default values will be omitted in JSON joutput. For example, an int32 field // fields with default values will be omitted in JSON output. For example, an
// set to 0 will be omitted. Set this flag to true will override the default // int32 field set to 0 will be omitted. Set this flag to true will override
// behavior and print primitive fields regardless of their values. // the default behavior and print primitive fields regardless of their values.
bool always_print_primitive_fields; bool always_print_primitive_fields;
// Whether to always print enums as ints. By default they are rendered as // Whether to always print enums as ints. By default they are rendered as
// strings. // strings.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment