{"action":"created","issue":{"url":"https://api.github.com/repos/bignerdranch/Freddy/issues/76","repository_url":"https://api.github.com/repos/bignerdranch/Freddy","labels_url":"https://api.github.com/repos/bignerdranch/Freddy/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/bignerdranch/Freddy/issues/76/comments","events_url":"https://api.github.com/repos/bignerdranch/Freddy/issues/76/events","html_url":"https://github.com/bignerdranch/Freddy/issues/76","id":121128291,"number":76,"title":"Large integers cause overflows","user":{"login":"zwaldowski","id":170812,"avatar_url":"https://avatars.githubusercontent.com/u/170812?v=3","gravatar_id":"","url":"https://api.github.com/users/zwaldowski","html_url":"https://github.com/zwaldowski","followers_url":"https://api.github.com/users/zwaldowski/followers","following_url":"https://api.github.com/users/zwaldowski/following{/other_user}","gists_url":"https://api.github.com/users/zwaldowski/gists{/gist_id}","starred_url":"https://api.github.com/users/zwaldowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zwaldowski/subscriptions","organizations_url":"https://api.github.com/users/zwaldowski/orgs","repos_url":"https://api.github.com/users/zwaldowski/repos","events_url":"https://api.github.com/users/zwaldowski/events{/privacy}","received_events_url":"https://api.github.com/users/zwaldowski/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bignerdranch/Freddy/labels/api%20change","name":"api change","color":"eb6420"},{"url":"https://api.github.com/repos/bignerdranch/Freddy/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/bignerdranch/Freddy/milestones/4","html_url":"https://github.com/bignerdranch/Freddy/milestones/Future","labels_url":"https://api.github.com/repos/bignerdranch/Freddy/milestones/4/labels","id":1554360,"number":4,"title":"Future","description":"The next release in the 2.x series.","creator":{"login":"zwaldowski","id":170812,"avatar_url":"https://avatars.githubusercontent.com/u/170812?v=3","gravatar_id":"","url":"https://api.github.com/users/zwaldowski","html_url":"https://github.com/zwaldowski","followers_url":"https://api.github.com/users/zwaldowski/followers","following_url":"https://api.github.com/users/zwaldowski/following{/other_user}","gists_url":"https://api.github.com/users/zwaldowski/gists{/gist_id}","starred_url":"https://api.github.com/users/zwaldowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zwaldowski/subscriptions","organizations_url":"https://api.github.com/users/zwaldowski/orgs","repos_url":"https://api.github.com/users/zwaldowski/repos","events_url":"https://api.github.com/users/zwaldowski/events{/privacy}","received_events_url":"https://api.github.com/users/zwaldowski/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":1,"state":"open","created_at":"2016-01-31T23:18:47Z","updated_at":"2016-02-15T13:38:08Z","due_on":null,"closed_at":null},"comments":32,"created_at":"2015-12-08T23:53:49Z","updated_at":"2016-02-26T20:24:24Z","closed_at":null,"body":"Follow-on from #57. Consensus was that `JSON.Int` should continue to use `Swift.Int` as its associated type, but that still leaves the issue of overflows at hand. The stdlib asserts inside the parser, generally bringing down the whole app as a result.\r\n\r\nOptions include:\r\n* Switch the parser to the `&+` et. al. operators and explicitly allow overflows.\r\n* Switch the parser to the `addWithOverflow(_:_:)` et. al. functions, catch overflows, and throw errors, thus cancelling the parse.\r\n* Switch the parser to the `addWithOverflow(_:_:)` et. al. functions, catch overflows, and return `String`s for big integers. This might require some workflow changes in the parser.\r\n* Switch the parser to the `addWithOverflow(_:_:)` et. al. functions, catch overflows, and return `Double`s for big integers. (undesirable, but I mention it)"},"comment":{"url":"https://api.github.com/repos/bignerdranch/Freddy/issues/comments/189468487","html_url":"https://github.com/bignerdranch/Freddy/issues/76#issuecomment-189468487","issue_url":"https://api.github.com/repos/bignerdranch/Freddy/issues/76","id":189468487,"user":{"login":"jgallagher","id":1435635,"avatar_url":"https://avatars.githubusercontent.com/u/1435635?v=3","gravatar_id":"","url":"https://api.github.com/users/jgallagher","html_url":"https://github.com/jgallagher","followers_url":"https://api.github.com/users/jgallagher/followers","following_url":"https://api.github.com/users/jgallagher/following{/other_user}","gists_url":"https://api.github.com/users/jgallagher/gists{/gist_id}","starred_url":"https://api.github.com/users/jgallagher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgallagher/subscriptions","organizations_url":"https://api.github.com/users/jgallagher/orgs","repos_url":"https://api.github.com/users/jgallagher/repos","events_url":"https://api.github.com/users/jgallagher/events{/privacy}","received_events_url":"https://api.github.com/users/jgallagher/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T20:24:24Z","updated_at":"2016-02-26T20:24:24Z","body":"Sure thing! This is exactly why we left in the fallback to `NSJSONSerialization`. Didn't want to assume the Swift parser was 100% bug-free. :)"}}