I am having problem deserializing messages on c++ side
From c#, i do this:
using (MemoryStream ms = new MemoryStream())
{
Serializer.Serialize(ms, instance);
return ms.ToArray();
}
This is the class for instance parameter in protocol buffer.
message init_message
{
optional string subject = 1;
optional string html_body = 2;
optional string plain_body = 3;
}
on c++ side, i do, where msg is the byte array passed
entity.ParseFromArray(msg.get_data(), msg.data_length);
but it somehow drops all the line feeds and carriage returns \r\n in the transition for all the member variables.
What could be the reason?
Thanks,
rui