{"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/22430004","id":22430004,"diff_hunk":"@@ -209,34 +208,28 @@ func parseString(rest string) (*Node, map[string]bool, error) {\n \n // parseJSON converts JSON arrays to an AST.\n func parseJSON(rest string) (*Node, map[string]bool, error) {\n-\tvar (\n-\t\tmyJson   []interface{}\n-\t\tnext     = &Node{}\n-\t\torignext = next\n-\t\tprevnode = next\n-\t)\n-\n+\tvar myJson []interface{}","path":"builder/parser/line_parsers.go","position":26,"original_position":26,"commit_id":"e9cf38dae8beb68988f5f28fc11a32e386d7488c","original_commit_id":"e9cf38dae8beb68988f5f28fc11a32e386d7488c","user":{"login":"LK4D4","id":101445,"avatar_url":"https://avatars.githubusercontent.com/u/101445?v=3","gravatar_id":"","url":"https://api.github.com/users/LK4D4","html_url":"https://github.com/LK4D4","followers_url":"https://api.github.com/users/LK4D4/followers","following_url":"https://api.github.com/users/LK4D4/following{/other_user}","gists_url":"https://api.github.com/users/LK4D4/gists{/gist_id}","starred_url":"https://api.github.com/users/LK4D4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LK4D4/subscriptions","organizations_url":"https://api.github.com/users/LK4D4/orgs","repos_url":"https://api.github.com/users/LK4D4/repos","events_url":"https://api.github.com/users/LK4D4/events{/privacy}","received_events_url":"https://api.github.com/users/LK4D4/received_events","type":"User","site_admin":false},"body":"Json is sucks. As I said before :D","created_at":"2015-01-03T06:42:35Z","updated_at":"2015-01-03T06:42:35Z","html_url":"https://github.com/docker/docker/pull/9881#discussion_r22430004","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/9881","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/22430004"},"html":{"href":"https://github.com/docker/docker/pull/9881#discussion_r22430004"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/9881"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/9881","id":26779896,"html_url":"https://github.com/docker/docker/pull/9881","diff_url":"https://github.com/docker/docker/pull/9881.diff","patch_url":"https://github.com/docker/docker/pull/9881.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/9881","number":9881,"state":"open","locked":false,"title":"Adjust builder to validate that JSON in Dockerfiles are arrays of strings and nothing else to match how we describe them to people (and what all our existing tests already assumed)","user":{"login":"tianon","id":161631,"avatar_url":"https://avatars.githubusercontent.com/u/161631?v=3","gravatar_id":"","url":"https://api.github.com/users/tianon","html_url":"https://github.com/tianon","followers_url":"https://api.github.com/users/tianon/followers","following_url":"https://api.github.com/users/tianon/following{/other_user}","gists_url":"https://api.github.com/users/tianon/gists{/gist_id}","starred_url":"https://api.github.com/users/tianon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tianon/subscriptions","organizations_url":"https://api.github.com/users/tianon/orgs","repos_url":"https://api.github.com/users/tianon/repos","events_url":"https://api.github.com/users/tianon/events{/privacy}","received_events_url":"https://api.github.com/users/tianon/received_events","type":"User","site_admin":false},"body":"This also adds more tests to help verify this, including unicode and nonprintable characters (hence the commit switching to `strconv.Quote`).\r\n    \r\nAs a bonus, this fixes a subtle bug where `[]` was turned into `[\"\"]` and then turned back into `[]` (and thus `[\"\"]` was impossible to actually round-trip correctly in a Dockerfile).\r\n\r\nIn the process, I replaced the custom `QuoteString` function with the equivalent (but with more special cased characters) `strconv.Quote` in `Node.Dump()`, and simplified the builder `TestTestData` a little by using `ioutil.ReadFile` directly instead of `os.Open` followed immediately by `ioutil.ReadAll`.","created_at":"2015-01-03T05:51:38Z","updated_at":"2015-01-03T06:42:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7803ec30bea7b8b5c7715f1b1f128b6f34c58204","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/docker/pulls/9881/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/9881/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments/{number}","comments_url":"https://api.github.com/repos/docker/docker/issues/9881/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/e9cf38dae8beb68988f5f28fc11a32e386d7488c","head":{"label":"tianon:json-array-of-strings","ref":"json-array-of-strings","sha":"e9cf38dae8beb68988f5f28fc11a32e386d7488c","user":{"login":"tianon","id":161631,"avatar_url":"https://avatars.githubusercontent.com/u/161631?v=3","gravatar_id":"","url":"https://api.github.com/users/tianon","html_url":"https://github.com/tianon","followers_url":"https://api.github.com/users/tianon/followers","following_url":"https://api.github.com/users/tianon/following{/other_user}","gists_url":"https://api.github.com/users/tianon/gists{/gist_id}","starred_url":"https://api.github.com/users/tianon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tianon/subscriptions","organizations_url":"https://api.github.com/users/tianon/orgs","repos_url":"https://api.github.com/users/tianon/repos","events_url":"https://api.github.com/users/tianon/events{/privacy}","received_events_url":"https://api.github.com/users/tianon/received_events","type":"User","site_admin":false},"repo":{"id":9697637,"name":"docker","full_name":"tianon/docker","owner":{"login":"tianon","id":161631,"avatar_url":"https://avatars.githubusercontent.com/u/161631?v=3","gravatar_id":"","url":"https://api.github.com/users/tianon","html_url":"https://github.com/tianon","followers_url":"https://api.github.com/users/tianon/followers","following_url":"https://api.github.com/users/tianon/following{/other_user}","gists_url":"https://api.github.com/users/tianon/gists{/gist_id}","starred_url":"https://api.github.com/users/tianon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tianon/subscriptions","organizations_url":"https://api.github.com/users/tianon/orgs","repos_url":"https://api.github.com/users/tianon/repos","events_url":"https://api.github.com/users/tianon/events{/privacy}","received_events_url":"https://api.github.com/users/tianon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tianon/docker","description":"Docker - the Linux container runtime","fork":true,"url":"https://api.github.com/repos/tianon/docker","forks_url":"https://api.github.com/repos/tianon/docker/forks","keys_url":"https://api.github.com/repos/tianon/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tianon/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tianon/docker/teams","hooks_url":"https://api.github.com/repos/tianon/docker/hooks","issue_events_url":"https://api.github.com/repos/tianon/docker/issues/events{/number}","events_url":"https://api.github.com/repos/tianon/docker/events","assignees_url":"https://api.github.com/repos/tianon/docker/assignees{/user}","branches_url":"https://api.github.com/repos/tianon/docker/branches{/branch}","tags_url":"https://api.github.com/repos/tianon/docker/tags","blobs_url":"https://api.github.com/repos/tianon/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tianon/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tianon/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/tianon/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tianon/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/tianon/docker/languages","stargazers_url":"https://api.github.com/repos/tianon/docker/stargazers","contributors_url":"https://api.github.com/repos/tianon/docker/contributors","subscribers_url":"https://api.github.com/repos/tianon/docker/subscribers","subscription_url":"https://api.github.com/repos/tianon/docker/subscription","commits_url":"https://api.github.com/repos/tianon/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/tianon/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/tianon/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/tianon/docker/issues/comments/{number}","contents_url":"https://api.github.com/repos/tianon/docker/contents/{+path}","compare_url":"https://api.github.com/repos/tianon/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tianon/docker/merges","archive_url":"https://api.github.com/repos/tianon/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tianon/docker/downloads","issues_url":"https://api.github.com/repos/tianon/docker/issues{/number}","pulls_url":"https://api.github.com/repos/tianon/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/tianon/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/tianon/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tianon/docker/labels{/name}","releases_url":"https://api.github.com/repos/tianon/docker/releases{/id}","created_at":"2013-04-26T14:52:16Z","updated_at":"2014-07-09T01:49:53Z","pushed_at":"2015-01-03T06:41:58Z","git_url":"git://github.com/tianon/docker.git","ssh_url":"git@github.com:tianon/docker.git","clone_url":"https://github.com/tianon/docker.git","svn_url":"https://github.com/tianon/docker","homepage":"http://docker.io","size":39299,"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":"docker:master","ref":"master","sha":"b2ab733c993ee6124c164defceac6996206d69fa","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"docker","full_name":"docker/docker","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments/{number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","created_at":"2013-01-18T18:10:57Z","updated_at":"2015-01-03T06:36:22Z","pushed_at":"2015-01-01T16:49:29Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":121239,"stargazers_count":18082,"watchers_count":18082,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3662,"mirror_url":null,"open_issues_count":1017,"forks":3662,"open_issues":1017,"watchers":18082,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/9881"},"html":{"href":"https://github.com/docker/docker/pull/9881"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/9881"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/9881/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/9881/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/9881/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/e9cf38dae8beb68988f5f28fc11a32e386d7488c"}}}}