I am trying to serialize the data using C# Google protobuf, and I am using
below code ,
private static void printStream(IMessage msg)
{
int size = msg.CalculateSize();
byte[] buffer = new byte[size];
CodedOutputStream output = new CodedOutputStream(buffer);
msg.WriteTo(output);
foreach (byte bb in buffer)
{
Console.Write(bb);
}
}
JSON of IMessage Object is
{
"clientIdentifier": {
"context": "CFID",
"value": "12340000"
},
"desiredSessionTimeout": "30000"
}
When I print the bytes, I am getting ::
1081862151092482117752161762341.. I believe, it is giving dec value
whereas I am expecting hex value : 0a0a1208313233343030303010b0ea01.
Please help me out , how to get the hex value..
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/protobuf/14bd44ad-10e4-4398-911f-efddad5cbc56%40googlegroups.com.