mcollina/msgpack5

how can i decode the serialized string

desenmeng opened this issue · 2 comments

var test = {hello: 'world' };
var serialized = msgpack.encode(test).toString();

// how can i decode the serialized string ?

You can't. msgpack5 is a binary protocol. If your transport can only send texts, you might consider serializing it to base64, and reading it back. However this would vanish all size gains that using msgpack will given you.