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..