In order for efficient server side parsing I am looking into a BSON solution directly for the browser javascript environment. The idea is to utilize the entire ASCII space by me
This might be incomplete but the goal of the project line up with what you want: https://github.com/muhmi/javascript-bson It doesn't look like that encodes directly to typed arrays which would be the most useful for sending over WebSocket.