I am trying to convert an empty proto-py object into JSON so that I can load different message data in from a JSON file. Some .pb2 files are extremely large and convoluted.
I am using the following line of code to try to extract the data from the .pb2 file.
msg_obj = TestMessage_pb2.Message()
json_str = MessageToDict(msg_obj, including_default_value_fields=True)
This does not print out the nested messages that exist within this top-level Message(). Is there any way I can convert a pb2 python file or even a .proto file straight to JSON?