{"action":"created","comment":{"url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/comments/60559548","id":60559548,"diff_hunk":"@@ -0,0 +1,32 @@\n+package uk.gov.justice.services.common.converter;\n+\n+import javax.json.Json;\n+import javax.json.JsonStructure;\n+import javax.json.JsonValue;\n+import javax.json.JsonWriter;\n+import java.io.StringWriter;\n+\n+/**\n+ * Converts JsonValue to Json as a String.\n+ */\n+public class JsonValueToStringConverter implements Converter<JsonValue, String> {\n+\n+    @Override\n+    public String convert(final JsonValue source) {\n+        final StringWriter stringWriter = new StringWriter();\n+        try (final JsonWriter writer = Json.createWriter(stringWriter)) {","path":"common/src/main/java/uk/gov/justice/services/common/converter/JsonValueToStringConverter.java","position":17,"original_position":17,"commit_id":"50c77db29d17c060960c4c25d28cfa1175179013","original_commit_id":"50c77db29d17c060960c4c25d28cfa1175179013","user":{"login":"matt-rich","id":17124628,"avatar_url":"https://avatars.githubusercontent.com/u/17124628?v=3","gravatar_id":"","url":"https://api.github.com/users/matt-rich","html_url":"https://github.com/matt-rich","followers_url":"https://api.github.com/users/matt-rich/followers","following_url":"https://api.github.com/users/matt-rich/following{/other_user}","gists_url":"https://api.github.com/users/matt-rich/gists{/gist_id}","starred_url":"https://api.github.com/users/matt-rich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matt-rich/subscriptions","organizations_url":"https://api.github.com/users/matt-rich/orgs","repos_url":"https://api.github.com/users/matt-rich/repos","events_url":"https://api.github.com/users/matt-rich/events{/privacy}","received_events_url":"https://api.github.com/users/matt-rich/received_events","type":"User","site_admin":false},"body":"Can you create StringWriter in the try block also for auto closure?","created_at":"2016-04-21T10:36:01Z","updated_at":"2016-04-21T10:36:01Z","html_url":"https://github.com/CJSCommonPlatform/microservice_framework/pull/43#discussion_r60559548","pull_request_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/43","_links":{"self":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/comments/60559548"},"html":{"href":"https://github.com/CJSCommonPlatform/microservice_framework/pull/43#discussion_r60559548"},"pull_request":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/43","id":67327293,"html_url":"https://github.com/CJSCommonPlatform/microservice_framework/pull/43","diff_url":"https://github.com/CJSCommonPlatform/microservice_framework/pull/43.diff","patch_url":"https://github.com/CJSCommonPlatform/microservice_framework/pull/43.patch","issue_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/43","number":43,"state":"open","locked":false,"title":"Rest client generator","user":{"login":"purple52","id":1073363,"avatar_url":"https://avatars.githubusercontent.com/u/1073363?v=3","gravatar_id":"","url":"https://api.github.com/users/purple52","html_url":"https://github.com/purple52","followers_url":"https://api.github.com/users/purple52/followers","following_url":"https://api.github.com/users/purple52/following{/other_user}","gists_url":"https://api.github.com/users/purple52/gists{/gist_id}","starred_url":"https://api.github.com/users/purple52/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purple52/subscriptions","organizations_url":"https://api.github.com/users/purple52/orgs","repos_url":"https://api.github.com/users/purple52/repos","events_url":"https://api.github.com/users/purple52/events{/privacy}","received_events_url":"https://api.github.com/users/purple52/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-21T10:00:50Z","updated_at":"2016-04-21T10:36:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"34159776fe33b83c78d69b47a46839a52c97ec84","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/43/commits","review_comments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/43/comments","review_comment_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/43/comments","statuses_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/statuses/50c77db29d17c060960c4c25d28cfa1175179013","head":{"label":"CJSCommonPlatform:rest-client-generator","ref":"rest-client-generator","sha":"50c77db29d17c060960c4c25d28cfa1175179013","user":{"login":"CJSCommonPlatform","id":16131145,"avatar_url":"https://avatars.githubusercontent.com/u/16131145?v=3","gravatar_id":"","url":"https://api.github.com/users/CJSCommonPlatform","html_url":"https://github.com/CJSCommonPlatform","followers_url":"https://api.github.com/users/CJSCommonPlatform/followers","following_url":"https://api.github.com/users/CJSCommonPlatform/following{/other_user}","gists_url":"https://api.github.com/users/CJSCommonPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/CJSCommonPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJSCommonPlatform/subscriptions","organizations_url":"https://api.github.com/users/CJSCommonPlatform/orgs","repos_url":"https://api.github.com/users/CJSCommonPlatform/repos","events_url":"https://api.github.com/users/CJSCommonPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/CJSCommonPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":51292541,"name":"microservice_framework","full_name":"CJSCommonPlatform/microservice_framework","owner":{"login":"CJSCommonPlatform","id":16131145,"avatar_url":"https://avatars.githubusercontent.com/u/16131145?v=3","gravatar_id":"","url":"https://api.github.com/users/CJSCommonPlatform","html_url":"https://github.com/CJSCommonPlatform","followers_url":"https://api.github.com/users/CJSCommonPlatform/followers","following_url":"https://api.github.com/users/CJSCommonPlatform/following{/other_user}","gists_url":"https://api.github.com/users/CJSCommonPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/CJSCommonPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJSCommonPlatform/subscriptions","organizations_url":"https://api.github.com/users/CJSCommonPlatform/orgs","repos_url":"https://api.github.com/users/CJSCommonPlatform/repos","events_url":"https://api.github.com/users/CJSCommonPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/CJSCommonPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CJSCommonPlatform/microservice_framework","description":"","fork":false,"url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework","forks_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/forks","keys_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/teams","hooks_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/hooks","issue_events_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/events{/number}","events_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/events","assignees_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/assignees{/user}","branches_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/branches{/branch}","tags_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/tags","blobs_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/statuses/{sha}","languages_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/languages","stargazers_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/stargazers","contributors_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/contributors","subscribers_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/subscribers","subscription_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/subscription","commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/contents/{+path}","compare_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/merges","archive_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/downloads","issues_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues{/number}","pulls_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls{/number}","milestones_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/milestones{/number}","notifications_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/labels{/name}","releases_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/releases{/id}","deployments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/deployments","created_at":"2016-02-08T10:51:31Z","updated_at":"2016-03-08T16:38:42Z","pushed_at":"2016-04-21T10:00:50Z","git_url":"git://github.com/CJSCommonPlatform/microservice_framework.git","ssh_url":"git@github.com:CJSCommonPlatform/microservice_framework.git","clone_url":"https://github.com/CJSCommonPlatform/microservice_framework.git","svn_url":"https://github.com/CJSCommonPlatform/microservice_framework","homepage":null,"size":810,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":4,"default_branch":"master"}},"base":{"label":"CJSCommonPlatform:master","ref":"master","sha":"be34692c0d93f4660ca72787b3bf464a715c121f","user":{"login":"CJSCommonPlatform","id":16131145,"avatar_url":"https://avatars.githubusercontent.com/u/16131145?v=3","gravatar_id":"","url":"https://api.github.com/users/CJSCommonPlatform","html_url":"https://github.com/CJSCommonPlatform","followers_url":"https://api.github.com/users/CJSCommonPlatform/followers","following_url":"https://api.github.com/users/CJSCommonPlatform/following{/other_user}","gists_url":"https://api.github.com/users/CJSCommonPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/CJSCommonPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJSCommonPlatform/subscriptions","organizations_url":"https://api.github.com/users/CJSCommonPlatform/orgs","repos_url":"https://api.github.com/users/CJSCommonPlatform/repos","events_url":"https://api.github.com/users/CJSCommonPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/CJSCommonPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":51292541,"name":"microservice_framework","full_name":"CJSCommonPlatform/microservice_framework","owner":{"login":"CJSCommonPlatform","id":16131145,"avatar_url":"https://avatars.githubusercontent.com/u/16131145?v=3","gravatar_id":"","url":"https://api.github.com/users/CJSCommonPlatform","html_url":"https://github.com/CJSCommonPlatform","followers_url":"https://api.github.com/users/CJSCommonPlatform/followers","following_url":"https://api.github.com/users/CJSCommonPlatform/following{/other_user}","gists_url":"https://api.github.com/users/CJSCommonPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/CJSCommonPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJSCommonPlatform/subscriptions","organizations_url":"https://api.github.com/users/CJSCommonPlatform/orgs","repos_url":"https://api.github.com/users/CJSCommonPlatform/repos","events_url":"https://api.github.com/users/CJSCommonPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/CJSCommonPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CJSCommonPlatform/microservice_framework","description":"","fork":false,"url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework","forks_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/forks","keys_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/teams","hooks_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/hooks","issue_events_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/events{/number}","events_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/events","assignees_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/assignees{/user}","branches_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/branches{/branch}","tags_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/tags","blobs_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/statuses/{sha}","languages_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/languages","stargazers_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/stargazers","contributors_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/contributors","subscribers_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/subscribers","subscription_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/subscription","commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/contents/{+path}","compare_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/merges","archive_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/downloads","issues_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues{/number}","pulls_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls{/number}","milestones_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/milestones{/number}","notifications_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/labels{/name}","releases_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/releases{/id}","deployments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/deployments","created_at":"2016-02-08T10:51:31Z","updated_at":"2016-03-08T16:38:42Z","pushed_at":"2016-04-21T10:00:50Z","git_url":"git://github.com/CJSCommonPlatform/microservice_framework.git","ssh_url":"git@github.com:CJSCommonPlatform/microservice_framework.git","clone_url":"https://github.com/CJSCommonPlatform/microservice_framework.git","svn_url":"https://github.com/CJSCommonPlatform/microservice_framework","homepage":null,"size":810,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/43"},"html":{"href":"https://github.com/CJSCommonPlatform/microservice_framework/pull/43"},"issue":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/43"},"comments":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/statuses/50c77db29d17c060960c4c25d28cfa1175179013"}}}}