{"action":"created","issue":{"url":"https://api.github.com/repos/boto/botocore/issues/737","labels_url":"https://api.github.com/repos/boto/botocore/issues/737/labels{/name}","comments_url":"https://api.github.com/repos/boto/botocore/issues/737/comments","events_url":"https://api.github.com/repos/boto/botocore/issues/737/events","html_url":"https://github.com/boto/botocore/pull/737","id":121126377,"number":737,"title":"Decode JSON pagination tokens.","user":{"login":"JordonPhillips","id":2643092,"avatar_url":"https://avatars.githubusercontent.com/u/2643092?v=3","gravatar_id":"","url":"https://api.github.com/users/JordonPhillips","html_url":"https://github.com/JordonPhillips","followers_url":"https://api.github.com/users/JordonPhillips/followers","following_url":"https://api.github.com/users/JordonPhillips/following{/other_user}","gists_url":"https://api.github.com/users/JordonPhillips/gists{/gist_id}","starred_url":"https://api.github.com/users/JordonPhillips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JordonPhillips/subscriptions","organizations_url":"https://api.github.com/users/JordonPhillips/orgs","repos_url":"https://api.github.com/users/JordonPhillips/repos","events_url":"https://api.github.com/users/JordonPhillips/events{/privacy}","received_events_url":"https://api.github.com/users/JordonPhillips/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/boto/botocore/labels/needs-review","name":"needs-review","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-08T23:38:55Z","updated_at":"2015-12-09T18:42:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/boto/botocore/pulls/737","html_url":"https://github.com/boto/botocore/pull/737","diff_url":"https://github.com/boto/botocore/pull/737.diff","patch_url":"https://github.com/boto/botocore/pull/737.patch"},"body":"Fixes aws/aws-cli#1601\r\n\r\nThe issue was that dynamodb sends back dicts for pagination tokens rather than strings like other services do. When you hit a boundary, the `NextToken` we return would look something like this:\r\n\r\n`{'foo': 'bar'}___1234`\r\n\r\nWhen you pass that back in as the `StartingToken` for the next request we take the bits before `___`  and pass them into the request. The issue is that we take that as the string `\"{'foo': 'bar'}\"` instead  of the dict `{'foo': 'bar'}`. So when we pass that in, parameter validation would fail.\r\n\r\nThis PR will attempt to parse the prefix into a dict before passing it along. If it fails, it will fall back to previous behavior. \r\n\r\ncc @kyleknap @mtdowling @rayluo @jamesls "},"comment":{"url":"https://api.github.com/repos/boto/botocore/issues/comments/163353468","html_url":"https://github.com/boto/botocore/pull/737#issuecomment-163353468","issue_url":"https://api.github.com/repos/boto/botocore/issues/737","id":163353468,"user":{"login":"mtdowling","id":190930,"avatar_url":"https://avatars.githubusercontent.com/u/190930?v=3","gravatar_id":"","url":"https://api.github.com/users/mtdowling","html_url":"https://github.com/mtdowling","followers_url":"https://api.github.com/users/mtdowling/followers","following_url":"https://api.github.com/users/mtdowling/following{/other_user}","gists_url":"https://api.github.com/users/mtdowling/gists{/gist_id}","starred_url":"https://api.github.com/users/mtdowling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtdowling/subscriptions","organizations_url":"https://api.github.com/users/mtdowling/orgs","repos_url":"https://api.github.com/users/mtdowling/repos","events_url":"https://api.github.com/users/mtdowling/events{/privacy}","received_events_url":"https://api.github.com/users/mtdowling/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T18:42:56Z","updated_at":"2015-12-09T18:42:56Z","body":"I haven't looked too deeply at how it would be done, but is there any way to use the model to know what the type is before attempting to parse it in some way? For example, the thing you're targeting for DynamoDB is modeled as a map: https://github.com/boto/botocore/blob/develop/botocore/data/dynamodb/2012-08-10/service-2.json#L1223"}}