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
fc7eeda6
Commit
fc7eeda6
authored
Mar 31, 2016
by
Jisi Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix json_format.py in py26
parent
94aa50ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
json_format.py
python/google/protobuf/json_format.py
+4
-2
No files found.
python/google/protobuf/json_format.py
View file @
fc7eeda6
...
@@ -271,8 +271,10 @@ def _ListValueMessageToJsonObject(message, unused_including_default=False):
...
@@ -271,8 +271,10 @@ def _ListValueMessageToJsonObject(message, unused_including_default=False):
def
_StructMessageToJsonObject
(
message
,
unused_including_default
=
False
):
def
_StructMessageToJsonObject
(
message
,
unused_including_default
=
False
):
"""Converts Struct message according to Proto3 JSON Specification."""
"""Converts Struct message according to Proto3 JSON Specification."""
fields
=
message
.
fields
fields
=
message
.
fields
return
{
key
:
_ValueMessageToJsonObject
(
fields
[
key
])
ret
=
{}
for
key
in
fields
}
for
key
in
fields
:
ret
[
key
]
=
_ValueMessageToJsonObject
(
fields
[
key
])
return
ret
def
_IsWrapperMessage
(
message_descriptor
):
def
_IsWrapperMessage
(
message_descriptor
):
...
...
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