Use google.protobuf.json_format
for resource.dict_to_struct
and resource.struct_to_dict
#108
Labels
enhancement
New feature or request
What problem are you facing?
We have two helpers to convert between Python dictionaries and protobuf structs:
resource.struct_to_dict(some_struct)
resource.dict_to_struct(some_dict)
I believe these are equivalent to:
google.protobuf.json_format.MessageToDict(some_struct)
google.protobuf.json_format.ParseDict(some_dict, empty_struct)
How could this Function help solve your problem?
I think we should keep our helpers for discoverability/backward compatibility, but have them just use the
json_format
equivalents under the hood.The text was updated successfully, but these errors were encountered: