{"action":"closed","number":35,"pull_request":{"url":"https://api.github.com/repos/buger/jsonparser/pulls/35","id":65106455,"html_url":"https://github.com/buger/jsonparser/pull/35","diff_url":"https://github.com/buger/jsonparser/pull/35.diff","patch_url":"https://github.com/buger/jsonparser/pull/35.patch","issue_url":"https://api.github.com/repos/buger/jsonparser/issues/35","number":35,"state":"closed","locked":false,"title":"Better error handling","user":{"login":"matijavizintin","id":1749643,"avatar_url":"https://avatars.githubusercontent.com/u/1749643?v=3","gravatar_id":"","url":"https://api.github.com/users/matijavizintin","html_url":"https://github.com/matijavizintin","followers_url":"https://api.github.com/users/matijavizintin/followers","following_url":"https://api.github.com/users/matijavizintin/following{/other_user}","gists_url":"https://api.github.com/users/matijavizintin/gists{/gist_id}","starred_url":"https://api.github.com/users/matijavizintin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matijavizintin/subscriptions","organizations_url":"https://api.github.com/users/matijavizintin/orgs","repos_url":"https://api.github.com/users/matijavizintin/repos","events_url":"https://api.github.com/users/matijavizintin/events{/privacy}","received_events_url":"https://api.github.com/users/matijavizintin/received_events","type":"User","site_admin":false},"body":"**Description**: \r\nThis PR exports some errors as global variables to easier check for errors when calling Get* methods.\r\n\r\nFor now I exported just two errors, key path not found and unknown value type. If you think this type of error management is good I can change it also for other errors where it would make sense.\r\n\r\n**Benchmark before change**:\r\n`enchmarkJsonParserLarge-8 \t  100000\t     73036 ns/op\t      32 B/op\t       2 allocs/op`\r\n`BenchmarkJsonParserMedium-8\t  500000\t     12253 ns/op\t      32 B/op\t       2 allocs/op`\r\n`BenchmarkJsonParserSmall-8 \t 5000000\t      1217 ns/op\t       0 B/op\t       0 allocs/op`\r\n\r\n**Benchmark after change**:\r\n`BenchmarkJsonParserLarge-8 \t  100000\t     74244 ns/op\t       0 B/op\t       0 allocs/op`\r\n`BenchmarkJsonParserMedium-8\t  500000\t     12597 ns/op\t       0 B/op\t       0 allocs/op`\r\n`BenchmarkJsonParserSmall-8 \t 5000000\t      1145 ns/op\t       0 B/op\t       0 allocs/op`\r\n\r\n","created_at":"2016-04-04T07:47:04Z","updated_at":"2016-04-05T04:36:11Z","closed_at":"2016-04-05T04:36:11Z","merged_at":"2016-04-05T04:36:11Z","merge_commit_sha":"1d3fc5ab014ad3d0c88a2b00aa407cb8b9885d56","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/buger/jsonparser/pulls/35/commits","review_comments_url":"https://api.github.com/repos/buger/jsonparser/pulls/35/comments","review_comment_url":"https://api.github.com/repos/buger/jsonparser/pulls/comments{/number}","comments_url":"https://api.github.com/repos/buger/jsonparser/issues/35/comments","statuses_url":"https://api.github.com/repos/buger/jsonparser/statuses/1d3fc5ab014ad3d0c88a2b00aa407cb8b9885d56","head":{"label":"matijavizintin:better-error-handling","ref":"better-error-handling","sha":"1d3fc5ab014ad3d0c88a2b00aa407cb8b9885d56","user":{"login":"matijavizintin","id":1749643,"avatar_url":"https://avatars.githubusercontent.com/u/1749643?v=3","gravatar_id":"","url":"https://api.github.com/users/matijavizintin","html_url":"https://github.com/matijavizintin","followers_url":"https://api.github.com/users/matijavizintin/followers","following_url":"https://api.github.com/users/matijavizintin/following{/other_user}","gists_url":"https://api.github.com/users/matijavizintin/gists{/gist_id}","starred_url":"https://api.github.com/users/matijavizintin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matijavizintin/subscriptions","organizations_url":"https://api.github.com/users/matijavizintin/orgs","repos_url":"https://api.github.com/users/matijavizintin/repos","events_url":"https://api.github.com/users/matijavizintin/events{/privacy}","received_events_url":"https://api.github.com/users/matijavizintin/received_events","type":"User","site_admin":false},"repo":{"id":55176564,"name":"jsonparser","full_name":"matijavizintin/jsonparser","owner":{"login":"matijavizintin","id":1749643,"avatar_url":"https://avatars.githubusercontent.com/u/1749643?v=3","gravatar_id":"","url":"https://api.github.com/users/matijavizintin","html_url":"https://github.com/matijavizintin","followers_url":"https://api.github.com/users/matijavizintin/followers","following_url":"https://api.github.com/users/matijavizintin/following{/other_user}","gists_url":"https://api.github.com/users/matijavizintin/gists{/gist_id}","starred_url":"https://api.github.com/users/matijavizintin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matijavizintin/subscriptions","organizations_url":"https://api.github.com/users/matijavizintin/orgs","repos_url":"https://api.github.com/users/matijavizintin/repos","events_url":"https://api.github.com/users/matijavizintin/events{/privacy}","received_events_url":"https://api.github.com/users/matijavizintin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matijavizintin/jsonparser","description":"Alternative JSON parser for Go that does not require schema (so far fastest)","fork":true,"url":"https://api.github.com/repos/matijavizintin/jsonparser","forks_url":"https://api.github.com/repos/matijavizintin/jsonparser/forks","keys_url":"https://api.github.com/repos/matijavizintin/jsonparser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matijavizintin/jsonparser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matijavizintin/jsonparser/teams","hooks_url":"https://api.github.com/repos/matijavizintin/jsonparser/hooks","issue_events_url":"https://api.github.com/repos/matijavizintin/jsonparser/issues/events{/number}","events_url":"https://api.github.com/repos/matijavizintin/jsonparser/events","assignees_url":"https://api.github.com/repos/matijavizintin/jsonparser/assignees{/user}","branches_url":"https://api.github.com/repos/matijavizintin/jsonparser/branches{/branch}","tags_url":"https://api.github.com/repos/matijavizintin/jsonparser/tags","blobs_url":"https://api.github.com/repos/matijavizintin/jsonparser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matijavizintin/jsonparser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matijavizintin/jsonparser/git/refs{/sha}","trees_url":"https://api.github.com/repos/matijavizintin/jsonparser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matijavizintin/jsonparser/statuses/{sha}","languages_url":"https://api.github.com/repos/matijavizintin/jsonparser/languages","stargazers_url":"https://api.github.com/repos/matijavizintin/jsonparser/stargazers","contributors_url":"https://api.github.com/repos/matijavizintin/jsonparser/contributors","subscribers_url":"https://api.github.com/repos/matijavizintin/jsonparser/subscribers","subscription_url":"https://api.github.com/repos/matijavizintin/jsonparser/subscription","commits_url":"https://api.github.com/repos/matijavizintin/jsonparser/commits{/sha}","git_commits_url":"https://api.github.com/repos/matijavizintin/jsonparser/git/commits{/sha}","comments_url":"https://api.github.com/repos/matijavizintin/jsonparser/comments{/number}","issue_comment_url":"https://api.github.com/repos/matijavizintin/jsonparser/issues/comments{/number}","contents_url":"https://api.github.com/repos/matijavizintin/jsonparser/contents/{+path}","compare_url":"https://api.github.com/repos/matijavizintin/jsonparser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matijavizintin/jsonparser/merges","archive_url":"https://api.github.com/repos/matijavizintin/jsonparser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matijavizintin/jsonparser/downloads","issues_url":"https://api.github.com/repos/matijavizintin/jsonparser/issues{/number}","pulls_url":"https://api.github.com/repos/matijavizintin/jsonparser/pulls{/number}","milestones_url":"https://api.github.com/repos/matijavizintin/jsonparser/milestones{/number}","notifications_url":"https://api.github.com/repos/matijavizintin/jsonparser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matijavizintin/jsonparser/labels{/name}","releases_url":"https://api.github.com/repos/matijavizintin/jsonparser/releases{/id}","deployments_url":"https://api.github.com/repos/matijavizintin/jsonparser/deployments","created_at":"2016-03-31T19:17:20Z","updated_at":"2016-03-31T19:17:21Z","pushed_at":"2016-04-04T07:32:30Z","git_url":"git://github.com/matijavizintin/jsonparser.git","ssh_url":"git@github.com:matijavizintin/jsonparser.git","clone_url":"https://github.com/matijavizintin/jsonparser.git","svn_url":"https://github.com/matijavizintin/jsonparser","homepage":"","size":91,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"buger:master","ref":"master","sha":"5c8d86779c54c2e917fc056d7bc3c305c16f5259","user":{"login":"buger","id":14009,"avatar_url":"https://avatars.githubusercontent.com/u/14009?v=3","gravatar_id":"","url":"https://api.github.com/users/buger","html_url":"https://github.com/buger","followers_url":"https://api.github.com/users/buger/followers","following_url":"https://api.github.com/users/buger/following{/other_user}","gists_url":"https://api.github.com/users/buger/gists{/gist_id}","starred_url":"https://api.github.com/users/buger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buger/subscriptions","organizations_url":"https://api.github.com/users/buger/orgs","repos_url":"https://api.github.com/users/buger/repos","events_url":"https://api.github.com/users/buger/events{/privacy}","received_events_url":"https://api.github.com/users/buger/received_events","type":"User","site_admin":false},"repo":{"id":54303805,"name":"jsonparser","full_name":"buger/jsonparser","owner":{"login":"buger","id":14009,"avatar_url":"https://avatars.githubusercontent.com/u/14009?v=3","gravatar_id":"","url":"https://api.github.com/users/buger","html_url":"https://github.com/buger","followers_url":"https://api.github.com/users/buger/followers","following_url":"https://api.github.com/users/buger/following{/other_user}","gists_url":"https://api.github.com/users/buger/gists{/gist_id}","starred_url":"https://api.github.com/users/buger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buger/subscriptions","organizations_url":"https://api.github.com/users/buger/orgs","repos_url":"https://api.github.com/users/buger/repos","events_url":"https://api.github.com/users/buger/events{/privacy}","received_events_url":"https://api.github.com/users/buger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/buger/jsonparser","description":"Alternative JSON parser for Go that does not require schema (so far fastest)","fork":false,"url":"https://api.github.com/repos/buger/jsonparser","forks_url":"https://api.github.com/repos/buger/jsonparser/forks","keys_url":"https://api.github.com/repos/buger/jsonparser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/buger/jsonparser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/buger/jsonparser/teams","hooks_url":"https://api.github.com/repos/buger/jsonparser/hooks","issue_events_url":"https://api.github.com/repos/buger/jsonparser/issues/events{/number}","events_url":"https://api.github.com/repos/buger/jsonparser/events","assignees_url":"https://api.github.com/repos/buger/jsonparser/assignees{/user}","branches_url":"https://api.github.com/repos/buger/jsonparser/branches{/branch}","tags_url":"https://api.github.com/repos/buger/jsonparser/tags","blobs_url":"https://api.github.com/repos/buger/jsonparser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/buger/jsonparser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/buger/jsonparser/git/refs{/sha}","trees_url":"https://api.github.com/repos/buger/jsonparser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/buger/jsonparser/statuses/{sha}","languages_url":"https://api.github.com/repos/buger/jsonparser/languages","stargazers_url":"https://api.github.com/repos/buger/jsonparser/stargazers","contributors_url":"https://api.github.com/repos/buger/jsonparser/contributors","subscribers_url":"https://api.github.com/repos/buger/jsonparser/subscribers","subscription_url":"https://api.github.com/repos/buger/jsonparser/subscription","commits_url":"https://api.github.com/repos/buger/jsonparser/commits{/sha}","git_commits_url":"https://api.github.com/repos/buger/jsonparser/git/commits{/sha}","comments_url":"https://api.github.com/repos/buger/jsonparser/comments{/number}","issue_comment_url":"https://api.github.com/repos/buger/jsonparser/issues/comments{/number}","contents_url":"https://api.github.com/repos/buger/jsonparser/contents/{+path}","compare_url":"https://api.github.com/repos/buger/jsonparser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/buger/jsonparser/merges","archive_url":"https://api.github.com/repos/buger/jsonparser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/buger/jsonparser/downloads","issues_url":"https://api.github.com/repos/buger/jsonparser/issues{/number}","pulls_url":"https://api.github.com/repos/buger/jsonparser/pulls{/number}","milestones_url":"https://api.github.com/repos/buger/jsonparser/milestones{/number}","notifications_url":"https://api.github.com/repos/buger/jsonparser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/buger/jsonparser/labels{/name}","releases_url":"https://api.github.com/repos/buger/jsonparser/releases{/id}","deployments_url":"https://api.github.com/repos/buger/jsonparser/deployments","created_at":"2016-03-20T06:22:33Z","updated_at":"2016-04-04T03:59:41Z","pushed_at":"2016-04-05T04:36:11Z","git_url":"git://github.com/buger/jsonparser.git","ssh_url":"git@github.com:buger/jsonparser.git","clone_url":"https://github.com/buger/jsonparser.git","svn_url":"https://github.com/buger/jsonparser","homepage":"","size":138,"stargazers_count":416,"watchers_count":416,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":5,"forks":15,"open_issues":5,"watchers":416,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/buger/jsonparser/pulls/35"},"html":{"href":"https://github.com/buger/jsonparser/pull/35"},"issue":{"href":"https://api.github.com/repos/buger/jsonparser/issues/35"},"comments":{"href":"https://api.github.com/repos/buger/jsonparser/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/buger/jsonparser/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/buger/jsonparser/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/buger/jsonparser/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/buger/jsonparser/statuses/1d3fc5ab014ad3d0c88a2b00aa407cb8b9885d56"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"buger","id":14009,"avatar_url":"https://avatars.githubusercontent.com/u/14009?v=3","gravatar_id":"","url":"https://api.github.com/users/buger","html_url":"https://github.com/buger","followers_url":"https://api.github.com/users/buger/followers","following_url":"https://api.github.com/users/buger/following{/other_user}","gists_url":"https://api.github.com/users/buger/gists{/gist_id}","starred_url":"https://api.github.com/users/buger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buger/subscriptions","organizations_url":"https://api.github.com/users/buger/orgs","repos_url":"https://api.github.com/users/buger/repos","events_url":"https://api.github.com/users/buger/events{/privacy}","received_events_url":"https://api.github.com/users/buger/received_events","type":"User","site_admin":false},"comments":5,"review_comments":0,"commits":1,"additions":14,"deletions":5,"changed_files":2}}