Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
6c27550d
Commit
6c27550d
authored
Dec 12, 2017
by
Feng Xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify default value behavior in JSON conversion.
Make it clear default value is only omitted for proto3.
parent
31c54d12
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
json_util.h
src/google/protobuf/util/json_util.h
+4
-4
No files found.
src/google/protobuf/util/json_util.h
View file @
6c27550d
...
...
@@ -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 pr
imitive 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 pr
oto3 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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment