On Mon, Apr 4, 2011 at 1:00 PM, Brian Maso <br...@blumenfeld-maso.com> wrote:
> Just noticed that on a whole lot of tweets I am retrieving through the
> Twitter Search API that the tweet "id" numeric value is not equal to
> the "id_str" value when JSON is turned in to JavaScript objects.


Before launch it came to our attention that some programming languages such
as Javascript cannot support numbers with >53bits. This can be easily
examined by running a command similar to: (90071992547409921).toString() in
your browsers console or by running the following JSON snippet through your
JSON parser.
    {"id": 10765432100123456789, "id_str": "10765432100123456789"}
In affected JSON parsers the ID will not be converted successfully and will
lose accuracy. In some parsers there may even be an exception.

Unless you plan on doing math with IDs, I'd recommend using id_str throughout.

Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 

Reply via email to