Cursoring: Addition of string-encoded equivalents of JSON cursor parameters starts 1/11/2010

2 views
Skip to first unread message

Wilhelm Bierbaum

unread,
Dec 22, 2009, 7:43:33 PM12/22/09
to twitter-ap...@googlegroups.com, twitter-deve...@googlegroups.com
In response to complaints we've been receiving about cursor IDs being
difficult to deal with because of their length (for example,
JavaScript can't deal with them -- see http://bit.ly/cursooooors), 
we're adding string equivalents of next_cursor and previous cursor to
those methods that return cursors when the JSON format is used.

A detailed account of the problems with big numbers and JavaScript

If you strictly parse your top-level returned JSON (which seems
unlikely given the spirit of the standard), you may need to make
some adjustments to your code.

Where the JSON with cursor parameters used to look like

    {
    "users":[{<!-- ... omitted records ... -->}}, ...], 
    "next_cursor":319261365477361289,
    "previous_cursor":0
    }

it will now return equivalent string values for next_cursor and
previous_cursor called next_cursor_str and previous_cursor_str,
respectively:

    {
    "users":[{<!-- ... omitted records ... -->}}, ...], 
    "next_cursor":319261365477361289,
    "next_cursor_str":"319261365477361289",
    "previous_cursor":0,
    "previous_cursor":"0"
    }


We hope this helps out those of you who were previously experiencing
trouble with cursors.

If you have any questions or comments, please feel free to post them
to twitter-development-talk. 

Thanks!

--
Wilhelm Bierbaum
Twitter Platform Team

Reply all
Reply to author
Forward
0 new messages