i mean, you could make one of the binary JSON formats out there available on a separate port, for clients/servers that support that. at least some of those formats support binary blobs or typed arrays, and virtually all of them are strongly typed. it does lead to the question of what to do with these binary blobs once they need to be serialised as plain-text JSON. one possibility is to standardise on Base64 encoding.

Reply to this note

Please Login to reply.

Discussion

not sure if WebSocket does any gzip compression, but it would most certainly be convenient if it did, because it should be able to compress Base64 quite efficiently.

That kind of defeats the purpose. The idea is that JSON shouldn’t be used