{"action":"created","comment":{"url":"https://api.github.com/repos/zendframework/zend-json/pulls/comments/45903694","id":45903694,"diff_hunk":"@@ -103,6 +103,8 @@ public static function encode($valueToEncode, $cycleCheck = false, $options = []\n                 return $valueToEncode->toJson();\n             } elseif (method_exists($valueToEncode, 'toArray')) {\n                 return static::encode($valueToEncode->toArray(), $cycleCheck, $options);\n+            } elseif ($valueToEncode instanceof ArrayIterator) {","path":"src/Json.php","position":4,"original_position":4,"commit_id":"c4025507c51d5f1fa7518895cc0e43b7749ab8e9","original_commit_id":"c4025507c51d5f1fa7518895cc0e43b7749ab8e9","user":{"login":"Maks3w","id":1301698,"avatar_url":"https://avatars.githubusercontent.com/u/1301698?v=3","gravatar_id":"","url":"https://api.github.com/users/Maks3w","html_url":"https://github.com/Maks3w","followers_url":"https://api.github.com/users/Maks3w/followers","following_url":"https://api.github.com/users/Maks3w/following{/other_user}","gists_url":"https://api.github.com/users/Maks3w/gists{/gist_id}","starred_url":"https://api.github.com/users/Maks3w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maks3w/subscriptions","organizations_url":"https://api.github.com/users/Maks3w/orgs","repos_url":"https://api.github.com/users/Maks3w/repos","events_url":"https://api.github.com/users/Maks3w/events{/privacy}","received_events_url":"https://api.github.com/users/Maks3w/received_events","type":"User","site_admin":false},"body":"What @Ocramius try to say is all those `elseif` can be transformed in `if`","created_at":"2015-11-25T18:40:27Z","updated_at":"2015-11-25T18:40:27Z","html_url":"https://github.com/zendframework/zend-json/pull/6#discussion_r45903694","pull_request_url":"https://api.github.com/repos/zendframework/zend-json/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/zendframework/zend-json/pulls/comments/45903694"},"html":{"href":"https://github.com/zendframework/zend-json/pull/6#discussion_r45903694"},"pull_request":{"href":"https://api.github.com/repos/zendframework/zend-json/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/zendframework/zend-json/pulls/6","id":51807590,"html_url":"https://github.com/zendframework/zend-json/pull/6","diff_url":"https://github.com/zendframework/zend-json/pull/6.diff","patch_url":"https://github.com/zendframework/zend-json/pull/6.patch","issue_url":"https://api.github.com/repos/zendframework/zend-json/issues/6","number":6,"state":"open","locked":false,"title":"Add support for ArrayIterator","user":{"login":"robob4him","id":690413,"avatar_url":"https://avatars.githubusercontent.com/u/690413?v=3","gravatar_id":"","url":"https://api.github.com/users/robob4him","html_url":"https://github.com/robob4him","followers_url":"https://api.github.com/users/robob4him/followers","following_url":"https://api.github.com/users/robob4him/following{/other_user}","gists_url":"https://api.github.com/users/robob4him/gists{/gist_id}","starred_url":"https://api.github.com/users/robob4him/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robob4him/subscriptions","organizations_url":"https://api.github.com/users/robob4him/orgs","repos_url":"https://api.github.com/users/robob4him/repos","events_url":"https://api.github.com/users/robob4him/events{/privacy}","received_events_url":"https://api.github.com/users/robob4him/received_events","type":"User","site_admin":false},"body":"ArrayIterator's \"getArrayCopy\" can return something better to serialize than the object itself.","created_at":"2015-11-25T15:24:37Z","updated_at":"2015-11-25T18:40:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"257a2e332951766a3747fe553512e725d4bfda4b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zendframework/zend-json/pulls/6/commits","review_comments_url":"https://api.github.com/repos/zendframework/zend-json/pulls/6/comments","review_comment_url":"https://api.github.com/repos/zendframework/zend-json/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendframework/zend-json/issues/6/comments","statuses_url":"https://api.github.com/repos/zendframework/zend-json/statuses/c4025507c51d5f1fa7518895cc0e43b7749ab8e9","head":{"label":"robob4him:develop","ref":"develop","sha":"c4025507c51d5f1fa7518895cc0e43b7749ab8e9","user":{"login":"robob4him","id":690413,"avatar_url":"https://avatars.githubusercontent.com/u/690413?v=3","gravatar_id":"","url":"https://api.github.com/users/robob4him","html_url":"https://github.com/robob4him","followers_url":"https://api.github.com/users/robob4him/followers","following_url":"https://api.github.com/users/robob4him/following{/other_user}","gists_url":"https://api.github.com/users/robob4him/gists{/gist_id}","starred_url":"https://api.github.com/users/robob4him/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robob4him/subscriptions","organizations_url":"https://api.github.com/users/robob4him/orgs","repos_url":"https://api.github.com/users/robob4him/repos","events_url":"https://api.github.com/users/robob4him/events{/privacy}","received_events_url":"https://api.github.com/users/robob4him/received_events","type":"User","site_admin":false},"repo":{"id":46868407,"name":"zend-json","full_name":"robob4him/zend-json","owner":{"login":"robob4him","id":690413,"avatar_url":"https://avatars.githubusercontent.com/u/690413?v=3","gravatar_id":"","url":"https://api.github.com/users/robob4him","html_url":"https://github.com/robob4him","followers_url":"https://api.github.com/users/robob4him/followers","following_url":"https://api.github.com/users/robob4him/following{/other_user}","gists_url":"https://api.github.com/users/robob4him/gists{/gist_id}","starred_url":"https://api.github.com/users/robob4him/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robob4him/subscriptions","organizations_url":"https://api.github.com/users/robob4him/orgs","repos_url":"https://api.github.com/users/robob4him/repos","events_url":"https://api.github.com/users/robob4him/events{/privacy}","received_events_url":"https://api.github.com/users/robob4him/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/robob4him/zend-json","description":"Json component from Zend Framework","fork":true,"url":"https://api.github.com/repos/robob4him/zend-json","forks_url":"https://api.github.com/repos/robob4him/zend-json/forks","keys_url":"https://api.github.com/repos/robob4him/zend-json/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robob4him/zend-json/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robob4him/zend-json/teams","hooks_url":"https://api.github.com/repos/robob4him/zend-json/hooks","issue_events_url":"https://api.github.com/repos/robob4him/zend-json/issues/events{/number}","events_url":"https://api.github.com/repos/robob4him/zend-json/events","assignees_url":"https://api.github.com/repos/robob4him/zend-json/assignees{/user}","branches_url":"https://api.github.com/repos/robob4him/zend-json/branches{/branch}","tags_url":"https://api.github.com/repos/robob4him/zend-json/tags","blobs_url":"https://api.github.com/repos/robob4him/zend-json/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robob4him/zend-json/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robob4him/zend-json/git/refs{/sha}","trees_url":"https://api.github.com/repos/robob4him/zend-json/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robob4him/zend-json/statuses/{sha}","languages_url":"https://api.github.com/repos/robob4him/zend-json/languages","stargazers_url":"https://api.github.com/repos/robob4him/zend-json/stargazers","contributors_url":"https://api.github.com/repos/robob4him/zend-json/contributors","subscribers_url":"https://api.github.com/repos/robob4him/zend-json/subscribers","subscription_url":"https://api.github.com/repos/robob4him/zend-json/subscription","commits_url":"https://api.github.com/repos/robob4him/zend-json/commits{/sha}","git_commits_url":"https://api.github.com/repos/robob4him/zend-json/git/commits{/sha}","comments_url":"https://api.github.com/repos/robob4him/zend-json/comments{/number}","issue_comment_url":"https://api.github.com/repos/robob4him/zend-json/issues/comments{/number}","contents_url":"https://api.github.com/repos/robob4him/zend-json/contents/{+path}","compare_url":"https://api.github.com/repos/robob4him/zend-json/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robob4him/zend-json/merges","archive_url":"https://api.github.com/repos/robob4him/zend-json/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robob4him/zend-json/downloads","issues_url":"https://api.github.com/repos/robob4him/zend-json/issues{/number}","pulls_url":"https://api.github.com/repos/robob4him/zend-json/pulls{/number}","milestones_url":"https://api.github.com/repos/robob4him/zend-json/milestones{/number}","notifications_url":"https://api.github.com/repos/robob4him/zend-json/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robob4him/zend-json/labels{/name}","releases_url":"https://api.github.com/repos/robob4him/zend-json/releases{/id}","created_at":"2015-11-25T15:00:52Z","updated_at":"2015-11-25T15:00:58Z","pushed_at":"2015-11-25T15:24:07Z","git_url":"git://github.com/robob4him/zend-json.git","ssh_url":"git@github.com:robob4him/zend-json.git","clone_url":"https://github.com/robob4him/zend-json.git","svn_url":"https://github.com/robob4him/zend-json","homepage":"https://github.com/zendframework/zf2","size":33852,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"zendframework:develop","ref":"develop","sha":"7ab8445ac5abf5e4c1a9aef19d2290a793d96e50","user":{"login":"zendframework","id":296074,"avatar_url":"https://avatars.githubusercontent.com/u/296074?v=3","gravatar_id":"","url":"https://api.github.com/users/zendframework","html_url":"https://github.com/zendframework","followers_url":"https://api.github.com/users/zendframework/followers","following_url":"https://api.github.com/users/zendframework/following{/other_user}","gists_url":"https://api.github.com/users/zendframework/gists{/gist_id}","starred_url":"https://api.github.com/users/zendframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendframework/subscriptions","organizations_url":"https://api.github.com/users/zendframework/orgs","repos_url":"https://api.github.com/users/zendframework/repos","events_url":"https://api.github.com/users/zendframework/events{/privacy}","received_events_url":"https://api.github.com/users/zendframework/received_events","type":"Organization","site_admin":false},"repo":{"id":35280809,"name":"zend-json","full_name":"zendframework/zend-json","owner":{"login":"zendframework","id":296074,"avatar_url":"https://avatars.githubusercontent.com/u/296074?v=3","gravatar_id":"","url":"https://api.github.com/users/zendframework","html_url":"https://github.com/zendframework","followers_url":"https://api.github.com/users/zendframework/followers","following_url":"https://api.github.com/users/zendframework/following{/other_user}","gists_url":"https://api.github.com/users/zendframework/gists{/gist_id}","starred_url":"https://api.github.com/users/zendframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendframework/subscriptions","organizations_url":"https://api.github.com/users/zendframework/orgs","repos_url":"https://api.github.com/users/zendframework/repos","events_url":"https://api.github.com/users/zendframework/events{/privacy}","received_events_url":"https://api.github.com/users/zendframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendframework/zend-json","description":"Json component from Zend Framework","fork":false,"url":"https://api.github.com/repos/zendframework/zend-json","forks_url":"https://api.github.com/repos/zendframework/zend-json/forks","keys_url":"https://api.github.com/repos/zendframework/zend-json/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendframework/zend-json/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendframework/zend-json/teams","hooks_url":"https://api.github.com/repos/zendframework/zend-json/hooks","issue_events_url":"https://api.github.com/repos/zendframework/zend-json/issues/events{/number}","events_url":"https://api.github.com/repos/zendframework/zend-json/events","assignees_url":"https://api.github.com/repos/zendframework/zend-json/assignees{/user}","branches_url":"https://api.github.com/repos/zendframework/zend-json/branches{/branch}","tags_url":"https://api.github.com/repos/zendframework/zend-json/tags","blobs_url":"https://api.github.com/repos/zendframework/zend-json/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendframework/zend-json/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendframework/zend-json/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendframework/zend-json/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendframework/zend-json/statuses/{sha}","languages_url":"https://api.github.com/repos/zendframework/zend-json/languages","stargazers_url":"https://api.github.com/repos/zendframework/zend-json/stargazers","contributors_url":"https://api.github.com/repos/zendframework/zend-json/contributors","subscribers_url":"https://api.github.com/repos/zendframework/zend-json/subscribers","subscription_url":"https://api.github.com/repos/zendframework/zend-json/subscription","commits_url":"https://api.github.com/repos/zendframework/zend-json/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendframework/zend-json/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendframework/zend-json/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendframework/zend-json/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendframework/zend-json/contents/{+path}","compare_url":"https://api.github.com/repos/zendframework/zend-json/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendframework/zend-json/merges","archive_url":"https://api.github.com/repos/zendframework/zend-json/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendframework/zend-json/downloads","issues_url":"https://api.github.com/repos/zendframework/zend-json/issues{/number}","pulls_url":"https://api.github.com/repos/zendframework/zend-json/pulls{/number}","milestones_url":"https://api.github.com/repos/zendframework/zend-json/milestones{/number}","notifications_url":"https://api.github.com/repos/zendframework/zend-json/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendframework/zend-json/labels{/name}","releases_url":"https://api.github.com/repos/zendframework/zend-json/releases{/id}","created_at":"2015-05-08T13:28:02Z","updated_at":"2015-05-21T17:11:44Z","pushed_at":"2015-11-25T15:24:38Z","git_url":"git://github.com/zendframework/zend-json.git","ssh_url":"git@github.com:zendframework/zend-json.git","clone_url":"https://github.com/zendframework/zend-json.git","svn_url":"https://github.com/zendframework/zend-json","homepage":"https://github.com/zendframework/zf2","size":33854,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":3,"forks":11,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendframework/zend-json/pulls/6"},"html":{"href":"https://github.com/zendframework/zend-json/pull/6"},"issue":{"href":"https://api.github.com/repos/zendframework/zend-json/issues/6"},"comments":{"href":"https://api.github.com/repos/zendframework/zend-json/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/zendframework/zend-json/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/zendframework/zend-json/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendframework/zend-json/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/zendframework/zend-json/statuses/c4025507c51d5f1fa7518895cc0e43b7749ab8e9"}}}}