I have tried many things to decode an arrayBuffer made of an object like {"foo":"bar"}
This is the arrayBuffer:
ArrayBuffer {
[Uint8Contents]: <5b 6f 62 6a 65 63 74 20 4f 62 6a 65 63 74 5d>,
byteLength: 15
}
Using the simplest approach as TextDecoder it just return [object Object] so maybe the problem is the encoder? I'm out of ideias... I'm using the send method from this client here to send the data: https://www.npmjs.com/package/websocket
So, how to decode the arrayBuffer? Thanks