We are working on a project where we are sending UUIDs between a backedn written in C++ and a Python front end. Our proto file specifies that we want to store these UUIDs in byte fields. This maps to a std::string in C++ which we can assign to manually. We are running into a problem on the Python side though because assigning the raw 16 bytes to the string field in Python gives us the following:
exceptions.ValueError: ':\x19\x14\xd1Y\xf7\x11\xde\x9c[\x00\x1eO\xf3! \xd8' isn't in 7-bit ASCII encoding. This does make sense because Python is ensuring that the value is actually a string. My question then is how can we encode a UUID into a 16 byte data structure correctly? Is there a plan to fully support the "bytes" field type instead of simply mapping it to a string type? Thanks, Aron --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~----------~----~----~----~------~----~------~--~---