datacratic/soa — pull request #21 by dohse (2013-07-18 16:59:52+00:00)
Title: Ids in Danger

When deserializing numerical from Json they are treated as the `BIGDEC` type which leads to reserialization as numbers. When the resulting Json is read by Javascript integral numbers are truncated to 53 Bit which leads to corrupted Ids. Always serializing Ids as String is a safe and consistent behaviour.

`BIGDEC` `Id`s of `0` (or other `Id`s that happen to have a bit pattern of `0x0000000000000000`) are not serialized at all. It is more consistent to only skip serializing explicit `NULLID` `Id`s.