diff options
author | Jisi Liu <jisi.liu@gmail.com> | 2016-03-30 11:39:59 -0700 |
---|---|---|
committer | Jisi Liu <jisi.liu@gmail.com> | 2016-03-30 11:39:59 -0700 |
commit | 3b3c8abb9635eb3ea078a821a99c9ef29d66dff7 (patch) | |
tree | 7d2ec154f15c9f9153d890e76b6cf30e471ea488 /python/google/protobuf/json_format.py | |
parent | 78105897a8f01c7be9cf8502b6c58d47eb1ccdd7 (diff) |
Integrate google internal changes.
Diffstat (limited to 'python/google/protobuf/json_format.py')
-rw-r--r-- | python/google/protobuf/json_format.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/python/google/protobuf/json_format.py b/python/google/protobuf/json_format.py index 23382bdb..4342755a 100644 --- a/python/google/protobuf/json_format.py +++ b/python/google/protobuf/json_format.py @@ -271,10 +271,8 @@ def _ListValueMessageToJsonObject(message, unused_including_default=False): def _StructMessageToJsonObject(message, unused_including_default=False): """Converts Struct message according to Proto3 JSON Specification.""" fields = message.fields - js = {} - for key in fields.keys(): - js[key] = _ValueMessageToJsonObject(fields[key]) - return js + return {key: _ValueMessageToJsonObject(fields[key]) + for key in fields} def _IsWrapperMessage(message_descriptor): |