BonsaiDen / BiSON.js

Bandwidth optimized binary encoding for JavaScript
http://bonsaiden.github.com/BiSON.js
MIT License
252 stars 22 forks source link

JSON compat tradeoffs? #9

Open mikeal opened 11 years ago

mikeal commented 11 years ago

You mention that you aren't 100% compatible with JSON in the README, I'm wondering what those incompatibilities are.

BonsaiDen commented 11 years ago

Hi Mikeal,

those are mostly related to some incompatibilities with UTF16 strings, floating point precision being limited (i.e. not the full precision you would expect from a double) and integers that can only be in the range of 2^-31 - 2^31.

If you want to send user generated data, you probably don't want to use BiSON, but if you know exactly what you're sending (e.g. in a game or some similar application) it's very well suited for that.

mikeal commented 11 years ago

Date objects also appear to have an issue serializing :(