-
Couldn't load subscription status.
- Fork 174
Closed
Labels
Description
Hi,
How do I serialize byte array as "bin" and not "str"? I thought this code with isBinary set to true should work, but it keeps returning "str" data anyway.
MessagePackObject obj = new MessagePackObject(new byte[] { 1, 2, 3 }, isBinary: true);
var serializer = SerializationContext.Default.GetSerializer();
byte[] serialized = serializer.PackSingleObject(obj);
Console.WriteLine("Serialized: {0}", BitConverter.ToString(serialized))
This is output:
Serialized: A3-01-02-03
While I would expect the following output:
Serialized: C4-03-01-02-03
Thanks, Roman