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
0a7120ac
Unverified
Commit
0a7120ac
authored
7 years ago
by
Feng Xiao
Committed by
GitHub
7 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4037 from xfxyjwf/issue2880
Clarify default value behavior in JSON conversion.
parents
5ce724bc
6c27550d
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 @
0a7120ac
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
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