3 ms·
and 1% of the time, it just does the wrong thing. It just silent clobber your data; it might crash your program due to creating an incoherent logic state. Who k
by o11c 3y ago
and 1% of the time, it just does the wrong thing. It just silent clobber your data; it might crash your program due to creating an incoherent logic state. Who knows?
- theamk 3y agoThe rule is pretty simple: if you have fields which may potentially contain integers with outside of +-2*48 range, or floating points where you care about NaNs -- then do the safe thing and store them as strings. That one simple rule ensures your data won't be clobbered and you program won't crash. (And yes, your serialization/deserialization code will need to contain explicit string conversions. But even with that extra conversion, Javascript is way more interoperable with anything and future-proof than any alternative like protobuf or msgpack)