I just had an unforgivable bug due to the json-framework JSON library. It was a regression, as it previously worked well a year ago.
When I updated the library back in June, there was a massive flaw: all NSNumbers in NSDictionaries converted to JSON (a pretty common occurance) are limited to 6 significant digits.
so the long: 1234567890 becomes 1234560000
and a double: 123.4567890 becomes 123.456, 12.34567890 becomes 12.3456
Well that is totally shit, I lost the precision of a bunch of data because of this and I am not happy. Now I should have had my own tests to catch this, I accept that. But I guess I put some faith into widely-used data serialisation libraries, that they don’t lose any bloody data.
No idea if this bug is already fixed in SBJSON and I don’t really care.
I just converted my entire codebase to JSONKit. The precision is now preserved. The entire library is just two source files, and the code is actually readable. json-framework is so unnecessarily complicated I can’t even work out where my data is getting lost, so it’s no surprise the bug was introduced.