{"action":"closed","issue":{"url":"https://api.github.com/repos/kraih/mojo/issues/859","labels_url":"https://api.github.com/repos/kraih/mojo/issues/859/labels{/name}","comments_url":"https://api.github.com/repos/kraih/mojo/issues/859/comments","events_url":"https://api.github.com/repos/kraih/mojo/issues/859/events","html_url":"https://github.com/kraih/mojo/issues/859","id":113590878,"number":859,"title":"decode_json for large integers","user":{"login":"cziebuhr","id":6673378,"avatar_url":"https://avatars.githubusercontent.com/u/6673378?v=3","gravatar_id":"","url":"https://api.github.com/users/cziebuhr","html_url":"https://github.com/cziebuhr","followers_url":"https://api.github.com/users/cziebuhr/followers","following_url":"https://api.github.com/users/cziebuhr/following{/other_user}","gists_url":"https://api.github.com/users/cziebuhr/gists{/gist_id}","starred_url":"https://api.github.com/users/cziebuhr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cziebuhr/subscriptions","organizations_url":"https://api.github.com/users/cziebuhr/orgs","repos_url":"https://api.github.com/users/cziebuhr/repos","events_url":"https://api.github.com/users/cziebuhr/events{/privacy}","received_events_url":"https://api.github.com/users/cziebuhr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2015-10-27T14:07:06Z","updated_at":"2015-10-30T19:07:57Z","closed_at":"2015-10-30T19:07:56Z","body":"Large integers get decoded as float instead of int.\r\n`Mojo::JSON::decode_json('[123456789012345678]')` returns `[1.23456789012346e+17]` instead of `[123456789012345678]`.\r\n\r\nIt seems that `$1` is special when used in numeric context:\r\n```\r\n# Number\r\nreturn 0 + $1\r\n  if /\\G([-]?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)/gc;\r\n```\r\nIt works when replacing this part with:\r\n```\r\n# Number\r\nmy ($i) = /\\G([-]?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)/gc;\r\nreturn 0 + $i if defined($i);\r\n```"}}