-
Couldn't load subscription status.
- Fork 174
Description
Hello,
I'm trying to serialize byte array as bin not str by referring to #100
But I still got byte array { 0xa3, 0x01, 0x02, 0x03 }.
My expectation is { 0xc4, 0x03, 0x01, 0x02, 0x03 }
My code
MessagePackObject obj = new MessagePackObject(new byte[] { 1, 2, 3 }, isBinary: true);
var ctx = new SerializationContext(PackerCompatibilityOptions.None);
var serializer = ctx.GetSerializer<MessagePackObject>();
byte[] serialized = serializer.PackSingleObject(obj);
I found "str" is set on this if block.
https://github.com/msgpack/msgpack-cli/blob/master/src/MsgPack/MessagePackObject.Utilities.cs#L1063
My code is wrong? or is there any restriction?
Thanks,