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?


You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To view this discussion on the web visit 
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to