News for hackers. Stuff that matters.
Re:Be careful with JS numbers by 0x0 on Sunday January 13, 2013 @02:15PM (#5051525)
This bit a lot of twitter integrations hard, when tweet id's exceeded the non-lossy integer range of javascript floats.

All of a sudden, tweet ids got rounded off to point to completely different entries!

https://dev.twitter.com/docs/twitter-ids-json-and-snowflake

Other JSON parsers may also be affected.

Re:Be careful with JS numbers by gren on Sunday January 13, 2013 @02:51PM (#5051655)
Woo I didn't know this! When I mention twitter ids it was just an example.

So it can happen to anyone and it's a real issue for any JSON API.

Re:Be careful with JS numbers by nness on Sunday January 13, 2013 @05:29PM (#5052143)
For quite some time there were API calls in Facebook that would return the ID's as numbers, not strings. It wasn't specific to the entire API though, only some calls would show the behaviour. As you can imagine, PHP did not like it. It was rather irritating...