{"action":"created","comment":{"url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/pulls/comments/210259432","pull_request_review_id":146434440,"id":210259432,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDI1OTQzMg==","diff_hunk":"@@ -0,0 +1,41 @@\n+<?php\n+/*\n+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ *\n+ * This software consists of voluntary contributions made by many individuals\n+ * and is licensed under the MIT license.\n+ */\n+\n+namespace Somnambulist\\Collection\\Traits;\n+\n+/**\n+ * Trait JsonSerializable\n+ *\n+ * @package    Somnambulist\\Collection\\Traits\n+ * @subpackage Somnambulist\\Collection\\Traits\\JsonSerializable\n+ *\n+ * @property array $items\n+ */\n+trait JsonSerializable\n+{\n+\n+    /**\n+     * @link http://php.net/manual/en/jsonserializable.jsonserialize.php\n+     *\n+     * @return string\n+     */\n+    public function jsonSerialize()\n+    {\n+        return \\json_encode($this->items);","path":"src/Traits/JsonSerializable.php","position":39,"original_position":39,"commit_id":"e66c50b6085f2f8606e9b7bdbc98c22ecfe86e51","original_commit_id":"e66c50b6085f2f8606e9b7bdbc98c22ecfe86e51","user":{"login":"dave-redfern","id":1477147,"node_id":"MDQ6VXNlcjE0NzcxNDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1477147?v=4","gravatar_id":"","url":"https://api.github.com/users/dave-redfern","html_url":"https://github.com/dave-redfern","followers_url":"https://api.github.com/users/dave-redfern/followers","following_url":"https://api.github.com/users/dave-redfern/following{/other_user}","gists_url":"https://api.github.com/users/dave-redfern/gists{/gist_id}","starred_url":"https://api.github.com/users/dave-redfern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dave-redfern/subscriptions","organizations_url":"https://api.github.com/users/dave-redfern/orgs","repos_url":"https://api.github.com/users/dave-redfern/repos","events_url":"https://api.github.com/users/dave-redfern/events{/privacy}","received_events_url":"https://api.github.com/users/dave-redfern/received_events","type":"User","site_admin":false},"body":"This should call `toJson()` from the `Exportable` trait. Otherwise the output between the two methods will be different. `toJson()` exports to an array first before serializing the result.","created_at":"2018-08-15T12:59:49Z","updated_at":"2018-08-15T12:59:54Z","html_url":"https://github.com/dave-redfern/somnambulist-collection/pull/5#discussion_r210259432","pull_request_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/pulls/5","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/dave-redfern/somnambulist-collection/pulls/comments/210259432"},"html":{"href":"https://github.com/dave-redfern/somnambulist-collection/pull/5#discussion_r210259432"},"pull_request":{"href":"https://api.github.com/repos/dave-redfern/somnambulist-collection/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/pulls/5","id":208550076,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4NTUwMDc2","html_url":"https://github.com/dave-redfern/somnambulist-collection/pull/5","diff_url":"https://github.com/dave-redfern/somnambulist-collection/pull/5.diff","patch_url":"https://github.com/dave-redfern/somnambulist-collection/pull/5.patch","issue_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/issues/5","number":5,"state":"open","locked":false,"title":"Added Json Seriazable interface","user":{"login":"nathandaly","id":33258212,"node_id":"MDQ6VXNlcjMzMjU4MjEy","avatar_url":"https://avatars2.githubusercontent.com/u/33258212?v=4","gravatar_id":"","url":"https://api.github.com/users/nathandaly","html_url":"https://github.com/nathandaly","followers_url":"https://api.github.com/users/nathandaly/followers","following_url":"https://api.github.com/users/nathandaly/following{/other_user}","gists_url":"https://api.github.com/users/nathandaly/gists{/gist_id}","starred_url":"https://api.github.com/users/nathandaly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathandaly/subscriptions","organizations_url":"https://api.github.com/users/nathandaly/orgs","repos_url":"https://api.github.com/users/nathandaly/repos","events_url":"https://api.github.com/users/nathandaly/events{/privacy}","received_events_url":"https://api.github.com/users/nathandaly/received_events","type":"User","site_admin":false},"body":"This allows the collection to be used with the \\json_encode function. Added ext-json to composer for UX.","created_at":"2018-08-15T12:33:23Z","updated_at":"2018-08-15T12:59:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"138641017e3f436794a61a589caa5a00ef6de162","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/pulls/5/commits","review_comments_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/pulls/5/comments","review_comment_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/issues/5/comments","statuses_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/statuses/e66c50b6085f2f8606e9b7bdbc98c22ecfe86e51","head":{"label":"nathandaly:feature/json-serializable","ref":"feature/json-serializable","sha":"e66c50b6085f2f8606e9b7bdbc98c22ecfe86e51","user":{"login":"nathandaly","id":33258212,"node_id":"MDQ6VXNlcjMzMjU4MjEy","avatar_url":"https://avatars2.githubusercontent.com/u/33258212?v=4","gravatar_id":"","url":"https://api.github.com/users/nathandaly","html_url":"https://github.com/nathandaly","followers_url":"https://api.github.com/users/nathandaly/followers","following_url":"https://api.github.com/users/nathandaly/following{/other_user}","gists_url":"https://api.github.com/users/nathandaly/gists{/gist_id}","starred_url":"https://api.github.com/users/nathandaly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathandaly/subscriptions","organizations_url":"https://api.github.com/users/nathandaly/orgs","repos_url":"https://api.github.com/users/nathandaly/repos","events_url":"https://api.github.com/users/nathandaly/events{/privacy}","received_events_url":"https://api.github.com/users/nathandaly/received_events","type":"User","site_admin":false},"repo":{"id":144849722,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ4NDk3MjI=","name":"somnambulist-collection","full_name":"nathandaly/somnambulist-collection","owner":{"login":"nathandaly","id":33258212,"node_id":"MDQ6VXNlcjMzMjU4MjEy","avatar_url":"https://avatars2.githubusercontent.com/u/33258212?v=4","gravatar_id":"","url":"https://api.github.com/users/nathandaly","html_url":"https://github.com/nathandaly","followers_url":"https://api.github.com/users/nathandaly/followers","following_url":"https://api.github.com/users/nathandaly/following{/other_user}","gists_url":"https://api.github.com/users/nathandaly/gists{/gist_id}","starred_url":"https://api.github.com/users/nathandaly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathandaly/subscriptions","organizations_url":"https://api.github.com/users/nathandaly/orgs","repos_url":"https://api.github.com/users/nathandaly/repos","events_url":"https://api.github.com/users/nathandaly/events{/privacy}","received_events_url":"https://api.github.com/users/nathandaly/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nathandaly/somnambulist-collection","description":"Framework independent collection similar to Laravel Collection and Doctrine ArrayCollection","fork":true,"url":"https://api.github.com/repos/nathandaly/somnambulist-collection","forks_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/forks","keys_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/teams","hooks_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/hooks","issue_events_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/issues/events{/number}","events_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/events","assignees_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/assignees{/user}","branches_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/branches{/branch}","tags_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/tags","blobs_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/git/refs{/sha}","trees_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/statuses/{sha}","languages_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/languages","stargazers_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/stargazers","contributors_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/contributors","subscribers_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/subscribers","subscription_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/subscription","commits_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/commits{/sha}","git_commits_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/git/commits{/sha}","comments_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/comments{/number}","issue_comment_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/issues/comments{/number}","contents_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/contents/{+path}","compare_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/merges","archive_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/downloads","issues_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/issues{/number}","pulls_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/pulls{/number}","milestones_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/milestones{/number}","notifications_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/labels{/name}","releases_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/releases{/id}","deployments_url":"https://api.github.com/repos/nathandaly/somnambulist-collection/deployments","created_at":"2018-08-15T12:22:33Z","updated_at":"2018-08-15T12:22:35Z","pushed_at":"2018-08-15T12:36:15Z","git_url":"git://github.com/nathandaly/somnambulist-collection.git","ssh_url":"git@github.com:nathandaly/somnambulist-collection.git","clone_url":"https://github.com/nathandaly/somnambulist-collection.git","svn_url":"https://github.com/nathandaly/somnambulist-collection","homepage":null,"size":74,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dave-redfern:master","ref":"master","sha":"82cf33c333b00ff375c403fbc7f32e4b476ee0b1","user":{"login":"dave-redfern","id":1477147,"node_id":"MDQ6VXNlcjE0NzcxNDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1477147?v=4","gravatar_id":"","url":"https://api.github.com/users/dave-redfern","html_url":"https://github.com/dave-redfern","followers_url":"https://api.github.com/users/dave-redfern/followers","following_url":"https://api.github.com/users/dave-redfern/following{/other_user}","gists_url":"https://api.github.com/users/dave-redfern/gists{/gist_id}","starred_url":"https://api.github.com/users/dave-redfern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dave-redfern/subscriptions","organizations_url":"https://api.github.com/users/dave-redfern/orgs","repos_url":"https://api.github.com/users/dave-redfern/repos","events_url":"https://api.github.com/users/dave-redfern/events{/privacy}","received_events_url":"https://api.github.com/users/dave-redfern/received_events","type":"User","site_admin":false},"repo":{"id":79736606,"node_id":"MDEwOlJlcG9zaXRvcnk3OTczNjYwNg==","name":"somnambulist-collection","full_name":"dave-redfern/somnambulist-collection","owner":{"login":"dave-redfern","id":1477147,"node_id":"MDQ6VXNlcjE0NzcxNDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1477147?v=4","gravatar_id":"","url":"https://api.github.com/users/dave-redfern","html_url":"https://github.com/dave-redfern","followers_url":"https://api.github.com/users/dave-redfern/followers","following_url":"https://api.github.com/users/dave-redfern/following{/other_user}","gists_url":"https://api.github.com/users/dave-redfern/gists{/gist_id}","starred_url":"https://api.github.com/users/dave-redfern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dave-redfern/subscriptions","organizations_url":"https://api.github.com/users/dave-redfern/orgs","repos_url":"https://api.github.com/users/dave-redfern/repos","events_url":"https://api.github.com/users/dave-redfern/events{/privacy}","received_events_url":"https://api.github.com/users/dave-redfern/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dave-redfern/somnambulist-collection","description":"Framework independent collection similar to Laravel Collection and Doctrine ArrayCollection","fork":false,"url":"https://api.github.com/repos/dave-redfern/somnambulist-collection","forks_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/forks","keys_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/teams","hooks_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/hooks","issue_events_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/issues/events{/number}","events_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/events","assignees_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/assignees{/user}","branches_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/branches{/branch}","tags_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/tags","blobs_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/git/refs{/sha}","trees_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/statuses/{sha}","languages_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/languages","stargazers_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/stargazers","contributors_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/contributors","subscribers_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/subscribers","subscription_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/subscription","commits_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/commits{/sha}","git_commits_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/git/commits{/sha}","comments_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/comments{/number}","issue_comment_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/issues/comments{/number}","contents_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/contents/{+path}","compare_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/merges","archive_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/downloads","issues_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/issues{/number}","pulls_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/pulls{/number}","milestones_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/milestones{/number}","notifications_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/labels{/name}","releases_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/releases{/id}","deployments_url":"https://api.github.com/repos/dave-redfern/somnambulist-collection/deployments","created_at":"2017-01-22T18:33:09Z","updated_at":"2018-06-26T12:53:50Z","pushed_at":"2018-08-15T12:36:16Z","git_url":"git://github.com/dave-redfern/somnambulist-collection.git","ssh_url":"git@github.com:dave-redfern/somnambulist-collection.git","clone_url":"https://github.com/dave-redfern/somnambulist-collection.git","svn_url":"https://github.com/dave-redfern/somnambulist-collection","homepage":null,"size":74,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":4,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dave-redfern/somnambulist-collection/pulls/5"},"html":{"href":"https://github.com/dave-redfern/somnambulist-collection/pull/5"},"issue":{"href":"https://api.github.com/repos/dave-redfern/somnambulist-collection/issues/5"},"comments":{"href":"https://api.github.com/repos/dave-redfern/somnambulist-collection/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/dave-redfern/somnambulist-collection/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/dave-redfern/somnambulist-collection/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dave-redfern/somnambulist-collection/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/dave-redfern/somnambulist-collection/statuses/e66c50b6085f2f8606e9b7bdbc98c22ecfe86e51"}},"author_association":"NONE"}}
{"actor":{"display_login":"dave-redfern"}}