{"action":"created","comment":{"url":"https://api.github.com/repos/crystal-lang/crystal/pulls/comments/127048771","pull_request_review_id":49594213,"id":127048771,"diff_hunk":"@@ -251,4 +257,25 @@ describe JSON::Builder do\n       json.end_document\n     end\n   end\n+\n+  it \"writes field with scalar in object\" do\n+    assert_built(%<{\"int\":42,\"float\":0.815,\"null\":null,\"bool\":true,\"string\":\"string\"}>) do\n+      object do\n+        field \"int\", 42\n+        field \"float\", 0.815\n+        field \"null\", nil\n+        field \"bool\", true\n+        field \"string\", \"string\"\n+      end\n+    end\n+  end\n+\n+  it \"writes field with arbitrary value in object\" do\n+    assert_built(%<{\"hash\":{\"hash\":\"value\"},\"object\":{\"int\":12}}>) do\n+      object do\n+        field \"hash\", {\"hash\" => \"value\"}\n+\tfield \"object\", TestObject.new","path":"spec/std/json/builder_spec.cr","position":34,"original_position":34,"commit_id":"31d3372e28384f724f5a64291a18d13fd451e42e","original_commit_id":"31d3372e28384f724f5a64291a18d13fd451e42e","user":{"login":"Sija","id":988,"avatar_url":"https://avatars0.githubusercontent.com/u/988?v=3","gravatar_id":"","url":"https://api.github.com/users/Sija","html_url":"https://github.com/Sija","followers_url":"https://api.github.com/users/Sija/followers","following_url":"https://api.github.com/users/Sija/following{/other_user}","gists_url":"https://api.github.com/users/Sija/gists{/gist_id}","starred_url":"https://api.github.com/users/Sija/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sija/subscriptions","organizations_url":"https://api.github.com/users/Sija/orgs","repos_url":"https://api.github.com/users/Sija/repos","events_url":"https://api.github.com/users/Sija/events{/privacy}","received_events_url":"https://api.github.com/users/Sija/received_events","type":"User","site_admin":false},"body":"indentation fail","created_at":"2017-07-12T19:26:28Z","updated_at":"2017-07-12T19:26:28Z","html_url":"https://github.com/crystal-lang/crystal/pull/4706#discussion_r127048771","pull_request_url":"https://api.github.com/repos/crystal-lang/crystal/pulls/4706","_links":{"self":{"href":"https://api.github.com/repos/crystal-lang/crystal/pulls/comments/127048771"},"html":{"href":"https://github.com/crystal-lang/crystal/pull/4706#discussion_r127048771"},"pull_request":{"href":"https://api.github.com/repos/crystal-lang/crystal/pulls/4706"}}},"pull_request":{"url":"https://api.github.com/repos/crystal-lang/crystal/pulls/4706","id":130216717,"html_url":"https://github.com/crystal-lang/crystal/pull/4706","diff_url":"https://github.com/crystal-lang/crystal/pull/4706.diff","patch_url":"https://github.com/crystal-lang/crystal/pull/4706.patch","issue_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4706","number":4706,"state":"open","locked":false,"title":"Allow `JSON::Builder#field` to accept non-scalar values.","user":{"login":"straight-shoota","id":466378,"avatar_url":"https://avatars3.githubusercontent.com/u/466378?v=3","gravatar_id":"","url":"https://api.github.com/users/straight-shoota","html_url":"https://github.com/straight-shoota","followers_url":"https://api.github.com/users/straight-shoota/followers","following_url":"https://api.github.com/users/straight-shoota/following{/other_user}","gists_url":"https://api.github.com/users/straight-shoota/gists{/gist_id}","starred_url":"https://api.github.com/users/straight-shoota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/straight-shoota/subscriptions","organizations_url":"https://api.github.com/users/straight-shoota/orgs","repos_url":"https://api.github.com/users/straight-shoota/repos","events_url":"https://api.github.com/users/straight-shoota/events{/privacy}","received_events_url":"https://api.github.com/users/straight-shoota/received_events","type":"User","site_admin":false},"body":"This simplifies writing complex objects as field values:\r\nInstead of `json.field \"field\" { value.to_json(json) }` you can simply\r\nwrite `json.field \"field\", value`.","created_at":"2017-07-12T19:24:34Z","updated_at":"2017-07-12T19:26:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"002547e495cd714ceeb59c53c9d929ae9ccc83c4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/crystal-lang/crystal/pulls/4706/commits","review_comments_url":"https://api.github.com/repos/crystal-lang/crystal/pulls/4706/comments","review_comment_url":"https://api.github.com/repos/crystal-lang/crystal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4706/comments","statuses_url":"https://api.github.com/repos/crystal-lang/crystal/statuses/31d3372e28384f724f5a64291a18d13fd451e42e","head":{"label":"straight-shoota:jm-json-field","ref":"jm-json-field","sha":"31d3372e28384f724f5a64291a18d13fd451e42e","user":{"login":"straight-shoota","id":466378,"avatar_url":"https://avatars3.githubusercontent.com/u/466378?v=3","gravatar_id":"","url":"https://api.github.com/users/straight-shoota","html_url":"https://github.com/straight-shoota","followers_url":"https://api.github.com/users/straight-shoota/followers","following_url":"https://api.github.com/users/straight-shoota/following{/other_user}","gists_url":"https://api.github.com/users/straight-shoota/gists{/gist_id}","starred_url":"https://api.github.com/users/straight-shoota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/straight-shoota/subscriptions","organizations_url":"https://api.github.com/users/straight-shoota/orgs","repos_url":"https://api.github.com/users/straight-shoota/repos","events_url":"https://api.github.com/users/straight-shoota/events{/privacy}","received_events_url":"https://api.github.com/users/straight-shoota/received_events","type":"User","site_admin":false},"repo":{"id":93867949,"name":"crystal","full_name":"straight-shoota/crystal","owner":{"login":"straight-shoota","id":466378,"avatar_url":"https://avatars3.githubusercontent.com/u/466378?v=3","gravatar_id":"","url":"https://api.github.com/users/straight-shoota","html_url":"https://github.com/straight-shoota","followers_url":"https://api.github.com/users/straight-shoota/followers","following_url":"https://api.github.com/users/straight-shoota/following{/other_user}","gists_url":"https://api.github.com/users/straight-shoota/gists{/gist_id}","starred_url":"https://api.github.com/users/straight-shoota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/straight-shoota/subscriptions","organizations_url":"https://api.github.com/users/straight-shoota/orgs","repos_url":"https://api.github.com/users/straight-shoota/repos","events_url":"https://api.github.com/users/straight-shoota/events{/privacy}","received_events_url":"https://api.github.com/users/straight-shoota/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/straight-shoota/crystal","description":"The Crystal Programming Language","fork":true,"url":"https://api.github.com/repos/straight-shoota/crystal","forks_url":"https://api.github.com/repos/straight-shoota/crystal/forks","keys_url":"https://api.github.com/repos/straight-shoota/crystal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/straight-shoota/crystal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/straight-shoota/crystal/teams","hooks_url":"https://api.github.com/repos/straight-shoota/crystal/hooks","issue_events_url":"https://api.github.com/repos/straight-shoota/crystal/issues/events{/number}","events_url":"https://api.github.com/repos/straight-shoota/crystal/events","assignees_url":"https://api.github.com/repos/straight-shoota/crystal/assignees{/user}","branches_url":"https://api.github.com/repos/straight-shoota/crystal/branches{/branch}","tags_url":"https://api.github.com/repos/straight-shoota/crystal/tags","blobs_url":"https://api.github.com/repos/straight-shoota/crystal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/straight-shoota/crystal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/straight-shoota/crystal/git/refs{/sha}","trees_url":"https://api.github.com/repos/straight-shoota/crystal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/straight-shoota/crystal/statuses/{sha}","languages_url":"https://api.github.com/repos/straight-shoota/crystal/languages","stargazers_url":"https://api.github.com/repos/straight-shoota/crystal/stargazers","contributors_url":"https://api.github.com/repos/straight-shoota/crystal/contributors","subscribers_url":"https://api.github.com/repos/straight-shoota/crystal/subscribers","subscription_url":"https://api.github.com/repos/straight-shoota/crystal/subscription","commits_url":"https://api.github.com/repos/straight-shoota/crystal/commits{/sha}","git_commits_url":"https://api.github.com/repos/straight-shoota/crystal/git/commits{/sha}","comments_url":"https://api.github.com/repos/straight-shoota/crystal/comments{/number}","issue_comment_url":"https://api.github.com/repos/straight-shoota/crystal/issues/comments{/number}","contents_url":"https://api.github.com/repos/straight-shoota/crystal/contents/{+path}","compare_url":"https://api.github.com/repos/straight-shoota/crystal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/straight-shoota/crystal/merges","archive_url":"https://api.github.com/repos/straight-shoota/crystal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/straight-shoota/crystal/downloads","issues_url":"https://api.github.com/repos/straight-shoota/crystal/issues{/number}","pulls_url":"https://api.github.com/repos/straight-shoota/crystal/pulls{/number}","milestones_url":"https://api.github.com/repos/straight-shoota/crystal/milestones{/number}","notifications_url":"https://api.github.com/repos/straight-shoota/crystal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/straight-shoota/crystal/labels{/name}","releases_url":"https://api.github.com/repos/straight-shoota/crystal/releases{/id}","deployments_url":"https://api.github.com/repos/straight-shoota/crystal/deployments","created_at":"2017-06-09T14:39:56Z","updated_at":"2017-06-09T14:40:01Z","pushed_at":"2017-07-12T19:23:41Z","git_url":"git://github.com/straight-shoota/crystal.git","ssh_url":"git@github.com:straight-shoota/crystal.git","clone_url":"https://github.com/straight-shoota/crystal.git","svn_url":"https://github.com/straight-shoota/crystal","homepage":"https://crystal-lang.org","size":33801,"stargazers_count":0,"watchers_count":0,"language":"Crystal","has_issues":false,"has_projects":true,"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":"crystal-lang:master","ref":"master","sha":"ffb748fc182d61222bc780d6dfa9605ce3351b63","user":{"login":"crystal-lang","id":6539796,"avatar_url":"https://avatars3.githubusercontent.com/u/6539796?v=3","gravatar_id":"","url":"https://api.github.com/users/crystal-lang","html_url":"https://github.com/crystal-lang","followers_url":"https://api.github.com/users/crystal-lang/followers","following_url":"https://api.github.com/users/crystal-lang/following{/other_user}","gists_url":"https://api.github.com/users/crystal-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/crystal-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crystal-lang/subscriptions","organizations_url":"https://api.github.com/users/crystal-lang/orgs","repos_url":"https://api.github.com/users/crystal-lang/repos","events_url":"https://api.github.com/users/crystal-lang/events{/privacy}","received_events_url":"https://api.github.com/users/crystal-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":6887813,"name":"crystal","full_name":"crystal-lang/crystal","owner":{"login":"crystal-lang","id":6539796,"avatar_url":"https://avatars3.githubusercontent.com/u/6539796?v=3","gravatar_id":"","url":"https://api.github.com/users/crystal-lang","html_url":"https://github.com/crystal-lang","followers_url":"https://api.github.com/users/crystal-lang/followers","following_url":"https://api.github.com/users/crystal-lang/following{/other_user}","gists_url":"https://api.github.com/users/crystal-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/crystal-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crystal-lang/subscriptions","organizations_url":"https://api.github.com/users/crystal-lang/orgs","repos_url":"https://api.github.com/users/crystal-lang/repos","events_url":"https://api.github.com/users/crystal-lang/events{/privacy}","received_events_url":"https://api.github.com/users/crystal-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crystal-lang/crystal","description":"The Crystal Programming Language","fork":false,"url":"https://api.github.com/repos/crystal-lang/crystal","forks_url":"https://api.github.com/repos/crystal-lang/crystal/forks","keys_url":"https://api.github.com/repos/crystal-lang/crystal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crystal-lang/crystal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crystal-lang/crystal/teams","hooks_url":"https://api.github.com/repos/crystal-lang/crystal/hooks","issue_events_url":"https://api.github.com/repos/crystal-lang/crystal/issues/events{/number}","events_url":"https://api.github.com/repos/crystal-lang/crystal/events","assignees_url":"https://api.github.com/repos/crystal-lang/crystal/assignees{/user}","branches_url":"https://api.github.com/repos/crystal-lang/crystal/branches{/branch}","tags_url":"https://api.github.com/repos/crystal-lang/crystal/tags","blobs_url":"https://api.github.com/repos/crystal-lang/crystal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crystal-lang/crystal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crystal-lang/crystal/git/refs{/sha}","trees_url":"https://api.github.com/repos/crystal-lang/crystal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crystal-lang/crystal/statuses/{sha}","languages_url":"https://api.github.com/repos/crystal-lang/crystal/languages","stargazers_url":"https://api.github.com/repos/crystal-lang/crystal/stargazers","contributors_url":"https://api.github.com/repos/crystal-lang/crystal/contributors","subscribers_url":"https://api.github.com/repos/crystal-lang/crystal/subscribers","subscription_url":"https://api.github.com/repos/crystal-lang/crystal/subscription","commits_url":"https://api.github.com/repos/crystal-lang/crystal/commits{/sha}","git_commits_url":"https://api.github.com/repos/crystal-lang/crystal/git/commits{/sha}","comments_url":"https://api.github.com/repos/crystal-lang/crystal/comments{/number}","issue_comment_url":"https://api.github.com/repos/crystal-lang/crystal/issues/comments{/number}","contents_url":"https://api.github.com/repos/crystal-lang/crystal/contents/{+path}","compare_url":"https://api.github.com/repos/crystal-lang/crystal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crystal-lang/crystal/merges","archive_url":"https://api.github.com/repos/crystal-lang/crystal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crystal-lang/crystal/downloads","issues_url":"https://api.github.com/repos/crystal-lang/crystal/issues{/number}","pulls_url":"https://api.github.com/repos/crystal-lang/crystal/pulls{/number}","milestones_url":"https://api.github.com/repos/crystal-lang/crystal/milestones{/number}","notifications_url":"https://api.github.com/repos/crystal-lang/crystal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crystal-lang/crystal/labels{/name}","releases_url":"https://api.github.com/repos/crystal-lang/crystal/releases{/id}","deployments_url":"https://api.github.com/repos/crystal-lang/crystal/deployments","created_at":"2012-11-27T17:32:32Z","updated_at":"2017-07-12T17:16:57Z","pushed_at":"2017-07-12T19:24:35Z","git_url":"git://github.com/crystal-lang/crystal.git","ssh_url":"git@github.com:crystal-lang/crystal.git","clone_url":"https://github.com/crystal-lang/crystal.git","svn_url":"https://github.com/crystal-lang/crystal","homepage":"https://crystal-lang.org","size":33809,"stargazers_count":8546,"watchers_count":8546,"language":"Crystal","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":682,"mirror_url":null,"open_issues_count":541,"forks":682,"open_issues":541,"watchers":8546,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crystal-lang/crystal/pulls/4706"},"html":{"href":"https://github.com/crystal-lang/crystal/pull/4706"},"issue":{"href":"https://api.github.com/repos/crystal-lang/crystal/issues/4706"},"comments":{"href":"https://api.github.com/repos/crystal-lang/crystal/issues/4706/comments"},"review_comments":{"href":"https://api.github.com/repos/crystal-lang/crystal/pulls/4706/comments"},"review_comment":{"href":"https://api.github.com/repos/crystal-lang/crystal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crystal-lang/crystal/pulls/4706/commits"},"statuses":{"href":"https://api.github.com/repos/crystal-lang/crystal/statuses/31d3372e28384f724f5a64291a18d13fd451e42e"}}}}
{"actor":{"display_login":"Sija"}}