Skip to content

Commit

Permalink
Merge pull request #8122 from mamapanda/MessageToDict-fix
Browse files Browse the repository at this point in the history
Make MessageToDict convert map keys to strings
  • Loading branch information
deannagarcia committed Oct 14, 2021
2 parents 3d223dc + 74056a0 commit 12f70b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/google/protobuf/json_format.py
Expand Up @@ -226,7 +226,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 12f70b7

Please sign in to comment.