{"action":"opened","issue":{"url":"https://api.github.com/repos/buger/jsonparser/issues/16","repository_url":"https://api.github.com/repos/buger/jsonparser","labels_url":"https://api.github.com/repos/buger/jsonparser/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/buger/jsonparser/issues/16/comments","events_url":"https://api.github.com/repos/buger/jsonparser/issues/16/events","html_url":"https://github.com/buger/jsonparser/issues/16","id":143286339,"number":16,"title":"Add GetInt helper (and make GetNumber faster)?","user":{"login":"alexcesaro","id":832479,"avatar_url":"https://avatars.githubusercontent.com/u/832479?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcesaro","html_url":"https://github.com/alexcesaro","followers_url":"https://api.github.com/users/alexcesaro/followers","following_url":"https://api.github.com/users/alexcesaro/following{/other_user}","gists_url":"https://api.github.com/users/alexcesaro/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcesaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcesaro/subscriptions","organizations_url":"https://api.github.com/users/alexcesaro/orgs","repos_url":"https://api.github.com/users/alexcesaro/repos","events_url":"https://api.github.com/users/alexcesaro/events{/privacy}","received_events_url":"https://api.github.com/users/alexcesaro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-24T15:59:53Z","updated_at":"2016-03-24T15:59:53Z","closed_at":null,"body":"First, thank you for this package!\r\n\r\nWhat do you think about adding a new helper function: `GetInt(data []byte, keys ...string) (val int64, offset int, err error)`?\r\nI think this is a frequent use-case, so this function would be quite useful.\r\n\r\nAlso to increase the performances of `GetNumber` and `GetInt`, you could copy the `strconv` package from the stdlib into your package and update the signatures of `ParseFloat` and `ParseInt` to use `[]byte` instead of `string`.\r\nIt would avoid allocating memory and make your package even faster.\r\n\r\nI think this is the kind of optimization that is acceptable in a performance-oriented package like yours."}}