Skip to content

Commit

Permalink
Make MessageToDict convert map keys to strings
Browse files Browse the repository at this point in the history
  • Loading branch information
mamapanda committed Dec 4, 2020
1 parent 7053169 commit 74056a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/google/protobuf/json_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def _RegularMessageToJsonObject(self, message, js):
else:
recorded_key = 'false'
else:
recorded_key = key
recorded_key = str(key)
js_map[recorded_key] = self._FieldToJsonObject(
v_field, value[key])
js[name] = js_map
Expand Down

0 comments on commit 74056a0

Please sign in to comment.