{"action":"opened","number":11,"pull_request":{"url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/pulls/11","id":75415077,"html_url":"https://github.com/jenkinsci/stash-branch-parameters-plugin/pull/11","diff_url":"https://github.com/jenkinsci/stash-branch-parameters-plugin/pull/11.diff","patch_url":"https://github.com/jenkinsci/stash-branch-parameters-plugin/pull/11.patch","issue_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/issues/11","number":11,"state":"open","locked":false,"title":"Specify UTF-8 encoding when parsing rest api response","user":{"login":"wadahiro","id":28739,"avatar_url":"https://avatars.githubusercontent.com/u/28739?v=3","gravatar_id":"","url":"https://api.github.com/users/wadahiro","html_url":"https://github.com/wadahiro","followers_url":"https://api.github.com/users/wadahiro/followers","following_url":"https://api.github.com/users/wadahiro/following{/other_user}","gists_url":"https://api.github.com/users/wadahiro/gists{/gist_id}","starred_url":"https://api.github.com/users/wadahiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wadahiro/subscriptions","organizations_url":"https://api.github.com/users/wadahiro/orgs","repos_url":"https://api.github.com/users/wadahiro/repos","events_url":"https://api.github.com/users/wadahiro/events{/privacy}","received_events_url":"https://api.github.com/users/wadahiro/received_events","type":"User","site_admin":false},"body":"If stash response contains multibyte characters, the parsing response fails at `StashConnector` as below. To fix this problem, I added the code specifing UTF-8 encoding.\r\n\r\n```\r\nCaused by:\r\nnet.sf.json.JSONException: Expected a ',' or '}' at character 1220 of {\"size\":172,\"limit\":1000,\"isLastPage\":true,\"values\":[{\"slug\": ... }],\"start\":0}\r\n        ...\r\n        at net.sf.json.util.JSONTokener.syntaxError(JSONTokener.java:499)\r\n        at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:1043)\r\n        at net.sf.json.JSONObject.fromObject(JSONObject.java:156)\r\n        at net.sf.json.util.JSONTokener.nextValue(JSONTokener.java:348)\r\n        at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:955)\r\n        at net.sf.json.JSONObject.fromObject(JSONObject.java:156)\r\n        at net.sf.json.util.JSONTokener.nextValue(JSONTokener.java:348)\r\n        at net.sf.json.JSONArray._fromJSONTokener(JSONArray.java:1131)\r\n        at net.sf.json.JSONArray.fromObject(JSONArray.java:125)\r\n        at net.sf.json.util.JSONTokener.nextValue(JSONTokener.java:351)\r\n        at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:955)\r\n        at net.sf.json.JSONObject._fromString(JSONObject.java:1145)\r\n        at net.sf.json.JSONObject.fromObject(JSONObject.java:162)\r\n        at net.sf.json.JSONObject.fromObject(JSONObject.java:132)\r\n        at org.jenkinsci.plugins.StashBranchParameter.StashConnector.getJson(StashConnector.java:163)\r\n        at org.jenkinsci.plugins.StashBranchParameter.StashConnector.getRepositories(StashConnector.java:131)\r\n        at org.jenkinsci.plugins.StashBranchParameter.StashBranchParameterDescriptor.doFillRepositoryItems(StashBranchParameterDescriptor.java:167)\r\n","created_at":"2016-06-28T03:57:40Z","updated_at":"2016-06-28T03:57:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/pulls/11/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/pulls/11/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/issues/11/comments","statuses_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/statuses/b60c4a072ed5e72f2ea15e5bc10000f506e3a7b3","head":{"label":"wadahiro:fix_encoding","ref":"fix_encoding","sha":"b60c4a072ed5e72f2ea15e5bc10000f506e3a7b3","user":{"login":"wadahiro","id":28739,"avatar_url":"https://avatars.githubusercontent.com/u/28739?v=3","gravatar_id":"","url":"https://api.github.com/users/wadahiro","html_url":"https://github.com/wadahiro","followers_url":"https://api.github.com/users/wadahiro/followers","following_url":"https://api.github.com/users/wadahiro/following{/other_user}","gists_url":"https://api.github.com/users/wadahiro/gists{/gist_id}","starred_url":"https://api.github.com/users/wadahiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wadahiro/subscriptions","organizations_url":"https://api.github.com/users/wadahiro/orgs","repos_url":"https://api.github.com/users/wadahiro/repos","events_url":"https://api.github.com/users/wadahiro/events{/privacy}","received_events_url":"https://api.github.com/users/wadahiro/received_events","type":"User","site_admin":false},"repo":{"id":43340053,"name":"StashBranchParametersPlugin","full_name":"wadahiro/StashBranchParametersPlugin","owner":{"login":"wadahiro","id":28739,"avatar_url":"https://avatars.githubusercontent.com/u/28739?v=3","gravatar_id":"","url":"https://api.github.com/users/wadahiro","html_url":"https://github.com/wadahiro","followers_url":"https://api.github.com/users/wadahiro/followers","following_url":"https://api.github.com/users/wadahiro/following{/other_user}","gists_url":"https://api.github.com/users/wadahiro/gists{/gist_id}","starred_url":"https://api.github.com/users/wadahiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wadahiro/subscriptions","organizations_url":"https://api.github.com/users/wadahiro/orgs","repos_url":"https://api.github.com/users/wadahiro/repos","events_url":"https://api.github.com/users/wadahiro/events{/privacy}","received_events_url":"https://api.github.com/users/wadahiro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wadahiro/StashBranchParametersPlugin","description":"","fork":true,"url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin","forks_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/forks","keys_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/teams","hooks_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/hooks","issue_events_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/issues/events{/number}","events_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/events","assignees_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/assignees{/user}","branches_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/branches{/branch}","tags_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/tags","blobs_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/statuses/{sha}","languages_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/languages","stargazers_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/stargazers","contributors_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/contributors","subscribers_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/subscribers","subscription_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/subscription","commits_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/contents/{+path}","compare_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/merges","archive_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/downloads","issues_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/issues{/number}","pulls_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/pulls{/number}","milestones_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/milestones{/number}","notifications_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/labels{/name}","releases_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/releases{/id}","deployments_url":"https://api.github.com/repos/wadahiro/StashBranchParametersPlugin/deployments","created_at":"2015-09-29T02:29:47Z","updated_at":"2016-06-28T01:22:01Z","pushed_at":"2016-06-28T03:44:35Z","git_url":"git://github.com/wadahiro/StashBranchParametersPlugin.git","ssh_url":"git@github.com:wadahiro/StashBranchParametersPlugin.git","clone_url":"https://github.com/wadahiro/StashBranchParametersPlugin.git","svn_url":"https://github.com/wadahiro/StashBranchParametersPlugin","homepage":null,"size":60,"stargazers_count":1,"watchers_count":1,"language":"Java","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":1,"default_branch":"master"}},"base":{"label":"jenkinsci:master","ref":"master","sha":"2890b02603d8992d93b803af79e0f95945755d2d","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":18096708,"name":"stash-branch-parameters-plugin","full_name":"jenkinsci/stash-branch-parameters-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/stash-branch-parameters-plugin","description":"","fork":true,"url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin","forks_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/deployments","created_at":"2014-03-25T10:36:40Z","updated_at":"2016-02-20T19:42:01Z","pushed_at":"2016-06-28T03:57:40Z","git_url":"git://github.com/jenkinsci/stash-branch-parameters-plugin.git","ssh_url":"git@github.com:jenkinsci/stash-branch-parameters-plugin.git","clone_url":"https://github.com/jenkinsci/stash-branch-parameters-plugin.git","svn_url":"https://github.com/jenkinsci/stash-branch-parameters-plugin","homepage":null,"size":70,"stargazers_count":9,"watchers_count":9,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":3,"forks":7,"open_issues":3,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/pulls/11"},"html":{"href":"https://github.com/jenkinsci/stash-branch-parameters-plugin/pull/11"},"issue":{"href":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/issues/11"},"comments":{"href":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/stash-branch-parameters-plugin/statuses/b60c4a072ed5e72f2ea15e5bc10000f506e3a7b3"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"wadahiro"}}