How to unpack msgPack messages?

104 views Asked by At

I tried to unpack a msgPack message but I'm getting the message "Expected raw value, but got array value".

My unpack method:

    private byte[] unpack(byte[] bytes) throws IOException {
        
        Template<byte[]> tmpl = Templates.TByteArray;
        MessagePack msgpack = new MessagePack();
        Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(bytes));
        
        return unpacker.read(tmpl);
    }
0

There are 0 answers