Commit fc7eeda6 authored by Jisi Liu's avatar Jisi Liu

Fix json_format.py in py26

parent 94aa50ff
...@@ -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):
......
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