Here is an example: Serialized message: ' \x12%/storage-array-action-add\x1a\r\n\x08username\x12\x01g\x1a\r\n \x08password\x12\x01p\x1a\x0e\n\x04type\x12\x06NetApp\x1a\t\n\x04name\x12\x01a\x1a\n\n\x04port\x12\x0280'
As you can see the highlighted text is added by protobuf (Which i assume are some kind of delimiters - please correct me if i am wrong). On Wednesday, May 14, 2014 4:56:08 PM UTC-7, Ganesh Sangle wrote: > > Hi Guys, > I am trying to use protobufs between two entities - one in python and > another in c++. > The advantage of using protobuf is i dont have to write > serializing/deserializing code. > > However, there is a complication. > The message that I create in python world, when i serialize it to be sent > over to the other side, has '\r\n'. > The code on the other side is already using \n as a delimiter and cutting > out the strings. > So what happens is that the message string gets split and when I try to > re-assemble it it doent work. > > Since my code is a smaller part of a larger existing system, I wanted to > know if there is a way to customize/configure protobuf so that it uses some > other characters instead of '\n\t', or just use a different representation > (all hex numbers or whatever) when converting it to string. > > Thanks, > Ganesh > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
