I must be googleing this wrong. I'm being given a feed in Universal Binary JSON format via a Websocket.
How does one parse/unpack universal binary json data to a useable form in pure javascript?
I've looked at ubjson.org and there appear to be two implementations of ubjson parsers in javascript. However, one is for node.js and the other for asm.js. Isn't ubjson supposed to parse/serialize to/from JSON 1-for-1?
Using the ubjson.js one without asm.js, I tried:
ubjson.bytesU8 = ubjsondata;
var value = ubjson.decode();
console.log(JSON.stringify(value, null, 2));
But it only logs a few numbers and then triggers the browser's print mode!