{"action":"created","comment":{"url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/comments/23123872","id":23123872,"diff_hunk":"@@ -6,6 +6,18 @@\n  */\n \n class RestfulFormatterHalJson extends \\RestfulFormatterBase implements \\RestfulFormatterInterface {\n+\n+  /**\n+   * Determine whether this is an associative array.\n+   *\n+   * @param array $array\n+   *\n+   * @return boolean\n+   */\n+  static function is_assoc(array $array) {","path":"plugins/formatter/hal_json/RestfulFormatterHalJson.class.php","position":12,"original_position":12,"commit_id":"1f47b4922cef92741908eafb9c90d6dbc324e129","original_commit_id":"1f47b4922cef92741908eafb9c90d6dbc324e129","user":{"login":"mateu-aguilo-bosch","id":1140906,"avatar_url":"https://avatars.githubusercontent.com/u/1140906?v=3","gravatar_id":"","url":"https://api.github.com/users/mateu-aguilo-bosch","html_url":"https://github.com/mateu-aguilo-bosch","followers_url":"https://api.github.com/users/mateu-aguilo-bosch/followers","following_url":"https://api.github.com/users/mateu-aguilo-bosch/following{/other_user}","gists_url":"https://api.github.com/users/mateu-aguilo-bosch/gists{/gist_id}","starred_url":"https://api.github.com/users/mateu-aguilo-bosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateu-aguilo-bosch/subscriptions","organizations_url":"https://api.github.com/users/mateu-aguilo-bosch/orgs","repos_url":"https://api.github.com/users/mateu-aguilo-bosch/repos","events_url":"https://api.github.com/users/mateu-aguilo-bosch/events{/privacy}","received_events_url":"https://api.github.com/users/mateu-aguilo-bosch/received_events","type":"User","site_admin":false},"body":"We already have `\\RestfulBase:isArrayNumeric`, maybe you can use that instead.","created_at":"2015-01-17T08:47:19Z","updated_at":"2015-01-17T08:47:19Z","html_url":"https://github.com/RESTful-Drupal/restful/pull/367#discussion_r23123872","pull_request_url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/367","_links":{"self":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/comments/23123872"},"html":{"href":"https://github.com/RESTful-Drupal/restful/pull/367#discussion_r23123872"},"pull_request":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/367"}}},"pull_request":{"url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/367","id":27338486,"html_url":"https://github.com/RESTful-Drupal/restful/pull/367","diff_url":"https://github.com/RESTful-Drupal/restful/pull/367.diff","patch_url":"https://github.com/RESTful-Drupal/restful/pull/367.patch","issue_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/367","number":367,"state":"open","locked":false,"title":"355 Bad HAL:JSON","user":{"login":"adaddinsane","id":291255,"avatar_url":"https://avatars.githubusercontent.com/u/291255?v=3","gravatar_id":"","url":"https://api.github.com/users/adaddinsane","html_url":"https://github.com/adaddinsane","followers_url":"https://api.github.com/users/adaddinsane/followers","following_url":"https://api.github.com/users/adaddinsane/following{/other_user}","gists_url":"https://api.github.com/users/adaddinsane/gists{/gist_id}","starred_url":"https://api.github.com/users/adaddinsane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adaddinsane/subscriptions","organizations_url":"https://api.github.com/users/adaddinsane/orgs","repos_url":"https://api.github.com/users/adaddinsane/repos","events_url":"https://api.github.com/users/adaddinsane/events{/privacy}","received_events_url":"https://api.github.com/users/adaddinsane/received_events","type":"User","site_admin":false},"body":"The initial issue was that sub-resources were not being output in HAL:JSON at all, then it was discovered (when fixed) they were always output (as embedded resources) at the outermost level and not associated with the resource to which they belonged.\r\n\r\nThe fix ensures that sub-resources are embedded with their parent resource and nested correctly.","created_at":"2015-01-14T10:06:50Z","updated_at":"2015-01-17T08:47:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f2918602250f58b971864f1be4ee71052d6ce6c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/367/commits","review_comments_url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/367/comments","review_comment_url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/comments/{number}","comments_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/367/comments","statuses_url":"https://api.github.com/repos/RESTful-Drupal/restful/statuses/1f47b4922cef92741908eafb9c90d6dbc324e129","head":{"label":"adaddinsane:355-Bad_Hal","ref":"355-Bad_Hal","sha":"1f47b4922cef92741908eafb9c90d6dbc324e129","user":{"login":"adaddinsane","id":291255,"avatar_url":"https://avatars.githubusercontent.com/u/291255?v=3","gravatar_id":"","url":"https://api.github.com/users/adaddinsane","html_url":"https://github.com/adaddinsane","followers_url":"https://api.github.com/users/adaddinsane/followers","following_url":"https://api.github.com/users/adaddinsane/following{/other_user}","gists_url":"https://api.github.com/users/adaddinsane/gists{/gist_id}","starred_url":"https://api.github.com/users/adaddinsane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adaddinsane/subscriptions","organizations_url":"https://api.github.com/users/adaddinsane/orgs","repos_url":"https://api.github.com/users/adaddinsane/repos","events_url":"https://api.github.com/users/adaddinsane/events{/privacy}","received_events_url":"https://api.github.com/users/adaddinsane/received_events","type":"User","site_admin":false},"repo":{"id":29010633,"name":"restful","full_name":"adaddinsane/restful","owner":{"login":"adaddinsane","id":291255,"avatar_url":"https://avatars.githubusercontent.com/u/291255?v=3","gravatar_id":"","url":"https://api.github.com/users/adaddinsane","html_url":"https://github.com/adaddinsane","followers_url":"https://api.github.com/users/adaddinsane/followers","following_url":"https://api.github.com/users/adaddinsane/following{/other_user}","gists_url":"https://api.github.com/users/adaddinsane/gists{/gist_id}","starred_url":"https://api.github.com/users/adaddinsane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adaddinsane/subscriptions","organizations_url":"https://api.github.com/users/adaddinsane/orgs","repos_url":"https://api.github.com/users/adaddinsane/repos","events_url":"https://api.github.com/users/adaddinsane/events{/privacy}","received_events_url":"https://api.github.com/users/adaddinsane/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adaddinsane/restful","description":"RESTful best practices for Drupal","fork":true,"url":"https://api.github.com/repos/adaddinsane/restful","forks_url":"https://api.github.com/repos/adaddinsane/restful/forks","keys_url":"https://api.github.com/repos/adaddinsane/restful/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adaddinsane/restful/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adaddinsane/restful/teams","hooks_url":"https://api.github.com/repos/adaddinsane/restful/hooks","issue_events_url":"https://api.github.com/repos/adaddinsane/restful/issues/events{/number}","events_url":"https://api.github.com/repos/adaddinsane/restful/events","assignees_url":"https://api.github.com/repos/adaddinsane/restful/assignees{/user}","branches_url":"https://api.github.com/repos/adaddinsane/restful/branches{/branch}","tags_url":"https://api.github.com/repos/adaddinsane/restful/tags","blobs_url":"https://api.github.com/repos/adaddinsane/restful/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adaddinsane/restful/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adaddinsane/restful/git/refs{/sha}","trees_url":"https://api.github.com/repos/adaddinsane/restful/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adaddinsane/restful/statuses/{sha}","languages_url":"https://api.github.com/repos/adaddinsane/restful/languages","stargazers_url":"https://api.github.com/repos/adaddinsane/restful/stargazers","contributors_url":"https://api.github.com/repos/adaddinsane/restful/contributors","subscribers_url":"https://api.github.com/repos/adaddinsane/restful/subscribers","subscription_url":"https://api.github.com/repos/adaddinsane/restful/subscription","commits_url":"https://api.github.com/repos/adaddinsane/restful/commits{/sha}","git_commits_url":"https://api.github.com/repos/adaddinsane/restful/git/commits{/sha}","comments_url":"https://api.github.com/repos/adaddinsane/restful/comments{/number}","issue_comment_url":"https://api.github.com/repos/adaddinsane/restful/issues/comments/{number}","contents_url":"https://api.github.com/repos/adaddinsane/restful/contents/{+path}","compare_url":"https://api.github.com/repos/adaddinsane/restful/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adaddinsane/restful/merges","archive_url":"https://api.github.com/repos/adaddinsane/restful/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adaddinsane/restful/downloads","issues_url":"https://api.github.com/repos/adaddinsane/restful/issues{/number}","pulls_url":"https://api.github.com/repos/adaddinsane/restful/pulls{/number}","milestones_url":"https://api.github.com/repos/adaddinsane/restful/milestones{/number}","notifications_url":"https://api.github.com/repos/adaddinsane/restful/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adaddinsane/restful/labels{/name}","releases_url":"https://api.github.com/repos/adaddinsane/restful/releases{/id}","created_at":"2015-01-09T09:50:27Z","updated_at":"2015-01-09T09:50:28Z","pushed_at":"2015-01-14T09:51:46Z","git_url":"git://github.com/adaddinsane/restful.git","ssh_url":"git@github.com:adaddinsane/restful.git","clone_url":"https://github.com/adaddinsane/restful.git","svn_url":"https://github.com/adaddinsane/restful","homepage":"","size":1027,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"7.x-1.x"}},"base":{"label":"RESTful-Drupal:7.x-1.x","ref":"7.x-1.x","sha":"fe02d40c4c2af5954f0ec2469a4026c3f5b4b114","user":{"login":"RESTful-Drupal","id":10175793,"avatar_url":"https://avatars.githubusercontent.com/u/10175793?v=3","gravatar_id":"","url":"https://api.github.com/users/RESTful-Drupal","html_url":"https://github.com/RESTful-Drupal","followers_url":"https://api.github.com/users/RESTful-Drupal/followers","following_url":"https://api.github.com/users/RESTful-Drupal/following{/other_user}","gists_url":"https://api.github.com/users/RESTful-Drupal/gists{/gist_id}","starred_url":"https://api.github.com/users/RESTful-Drupal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RESTful-Drupal/subscriptions","organizations_url":"https://api.github.com/users/RESTful-Drupal/orgs","repos_url":"https://api.github.com/users/RESTful-Drupal/repos","events_url":"https://api.github.com/users/RESTful-Drupal/events{/privacy}","received_events_url":"https://api.github.com/users/RESTful-Drupal/received_events","type":"Organization","site_admin":false},"repo":{"id":17918315,"name":"restful","full_name":"RESTful-Drupal/restful","owner":{"login":"RESTful-Drupal","id":10175793,"avatar_url":"https://avatars.githubusercontent.com/u/10175793?v=3","gravatar_id":"","url":"https://api.github.com/users/RESTful-Drupal","html_url":"https://github.com/RESTful-Drupal","followers_url":"https://api.github.com/users/RESTful-Drupal/followers","following_url":"https://api.github.com/users/RESTful-Drupal/following{/other_user}","gists_url":"https://api.github.com/users/RESTful-Drupal/gists{/gist_id}","starred_url":"https://api.github.com/users/RESTful-Drupal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RESTful-Drupal/subscriptions","organizations_url":"https://api.github.com/users/RESTful-Drupal/orgs","repos_url":"https://api.github.com/users/RESTful-Drupal/repos","events_url":"https://api.github.com/users/RESTful-Drupal/events{/privacy}","received_events_url":"https://api.github.com/users/RESTful-Drupal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RESTful-Drupal/restful","description":"RESTful best practices for Drupal","fork":false,"url":"https://api.github.com/repos/RESTful-Drupal/restful","forks_url":"https://api.github.com/repos/RESTful-Drupal/restful/forks","keys_url":"https://api.github.com/repos/RESTful-Drupal/restful/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RESTful-Drupal/restful/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RESTful-Drupal/restful/teams","hooks_url":"https://api.github.com/repos/RESTful-Drupal/restful/hooks","issue_events_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/events{/number}","events_url":"https://api.github.com/repos/RESTful-Drupal/restful/events","assignees_url":"https://api.github.com/repos/RESTful-Drupal/restful/assignees{/user}","branches_url":"https://api.github.com/repos/RESTful-Drupal/restful/branches{/branch}","tags_url":"https://api.github.com/repos/RESTful-Drupal/restful/tags","blobs_url":"https://api.github.com/repos/RESTful-Drupal/restful/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RESTful-Drupal/restful/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RESTful-Drupal/restful/git/refs{/sha}","trees_url":"https://api.github.com/repos/RESTful-Drupal/restful/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RESTful-Drupal/restful/statuses/{sha}","languages_url":"https://api.github.com/repos/RESTful-Drupal/restful/languages","stargazers_url":"https://api.github.com/repos/RESTful-Drupal/restful/stargazers","contributors_url":"https://api.github.com/repos/RESTful-Drupal/restful/contributors","subscribers_url":"https://api.github.com/repos/RESTful-Drupal/restful/subscribers","subscription_url":"https://api.github.com/repos/RESTful-Drupal/restful/subscription","commits_url":"https://api.github.com/repos/RESTful-Drupal/restful/commits{/sha}","git_commits_url":"https://api.github.com/repos/RESTful-Drupal/restful/git/commits{/sha}","comments_url":"https://api.github.com/repos/RESTful-Drupal/restful/comments{/number}","issue_comment_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/comments/{number}","contents_url":"https://api.github.com/repos/RESTful-Drupal/restful/contents/{+path}","compare_url":"https://api.github.com/repos/RESTful-Drupal/restful/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RESTful-Drupal/restful/merges","archive_url":"https://api.github.com/repos/RESTful-Drupal/restful/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RESTful-Drupal/restful/downloads","issues_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues{/number}","pulls_url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls{/number}","milestones_url":"https://api.github.com/repos/RESTful-Drupal/restful/milestones{/number}","notifications_url":"https://api.github.com/repos/RESTful-Drupal/restful/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RESTful-Drupal/restful/labels{/name}","releases_url":"https://api.github.com/repos/RESTful-Drupal/restful/releases{/id}","created_at":"2014-03-19T19:58:55Z","updated_at":"2015-01-17T01:33:34Z","pushed_at":"2015-01-17T08:45:19Z","git_url":"git://github.com/RESTful-Drupal/restful.git","ssh_url":"git@github.com:RESTful-Drupal/restful.git","clone_url":"https://github.com/RESTful-Drupal/restful.git","svn_url":"https://github.com/RESTful-Drupal/restful","homepage":"","size":6020,"stargazers_count":171,"watchers_count":171,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":28,"forks":35,"open_issues":28,"watchers":171,"default_branch":"7.x-1.x"}},"_links":{"self":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/367"},"html":{"href":"https://github.com/RESTful-Drupal/restful/pull/367"},"issue":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/issues/367"},"comments":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/issues/367/comments"},"review_comments":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/367/comments"},"review_comment":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/367/commits"},"statuses":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/statuses/1f47b4922cef92741908eafb9c90d6dbc324e129"}}}}