{"action":"created","issue":{"url":"https://api.github.com/repos/dancannon/gorethink/issues/380","repository_url":"https://api.github.com/repos/dancannon/gorethink","labels_url":"https://api.github.com/repos/dancannon/gorethink/issues/380/labels{/name}","comments_url":"https://api.github.com/repos/dancannon/gorethink/issues/380/comments","events_url":"https://api.github.com/repos/dancannon/gorethink/issues/380/events","html_url":"https://github.com/dancannon/gorethink/pull/380","id":186604242,"number":380,"title":"Don't convert nil slices into empty, non-nil slices","user":{"login":"ragalie","id":19682,"avatar_url":"https://avatars.githubusercontent.com/u/19682?v=3","gravatar_id":"","url":"https://api.github.com/users/ragalie","html_url":"https://github.com/ragalie","followers_url":"https://api.github.com/users/ragalie/followers","following_url":"https://api.github.com/users/ragalie/following{/other_user}","gists_url":"https://api.github.com/users/ragalie/gists{/gist_id}","starred_url":"https://api.github.com/users/ragalie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ragalie/subscriptions","organizations_url":"https://api.github.com/users/ragalie/orgs","repos_url":"https://api.github.com/users/ragalie/repos","events_url":"https://api.github.com/users/ragalie/events{/privacy}","received_events_url":"https://api.github.com/users/ragalie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-01T18:06:42Z","updated_at":"2016-11-02T22:14:19Z","closed_at":"2016-11-02T22:14:18Z","pull_request":{"url":"https://api.github.com/repos/dancannon/gorethink/pulls/380","html_url":"https://github.com/dancannon/gorethink/pull/380","diff_url":"https://github.com/dancannon/gorethink/pull/380.diff","patch_url":"https://github.com/dancannon/gorethink/pull/380.patch"},"body":"If a slice is nil, the json package marshals it into `null`. If it's\r\nempty, but non-nil, json marshals it into `[]`. Similarly, the json\r\npackage unmarshals `null` into `[]interface{}(nil)`, but `[]` into\r\n`[]interface{}{}`, which are unequal.\r\n\r\nAs a result, the previous functionality created a weird situation where\r\nthe object that was unmarshaled after a round-trip to rethink was\r\nunequal to the original object. That behavior is unusual as we should\r\nexpect that the objects would be equal.\r\n\r\nThis commit ensures that nil slices retain their nil-ness when encoded\r\nby gorethink, which ensures that json encodes them as `null` and then\r\ndecodes them as `[]inteface{}(nil)`, which is the same value they had\r\nbefore encoding."},"comment":{"url":"https://api.github.com/repos/dancannon/gorethink/issues/comments/258015863","html_url":"https://github.com/dancannon/gorethink/pull/380#issuecomment-258015863","issue_url":"https://api.github.com/repos/dancannon/gorethink/issues/380","id":258015863,"user":{"login":"dancannon","id":414768,"avatar_url":"https://avatars.githubusercontent.com/u/414768?v=3","gravatar_id":"","url":"https://api.github.com/users/dancannon","html_url":"https://github.com/dancannon","followers_url":"https://api.github.com/users/dancannon/followers","following_url":"https://api.github.com/users/dancannon/following{/other_user}","gists_url":"https://api.github.com/users/dancannon/gists{/gist_id}","starred_url":"https://api.github.com/users/dancannon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dancannon/subscriptions","organizations_url":"https://api.github.com/users/dancannon/orgs","repos_url":"https://api.github.com/users/dancannon/repos","events_url":"https://api.github.com/users/dancannon/events{/privacy}","received_events_url":"https://api.github.com/users/dancannon/received_events","type":"User","site_admin":false},"created_at":"2016-11-02T22:14:19Z","updated_at":"2016-11-02T22:14:19Z","body":"Thanks 👍  This PR has been merged to the `develop` branch and will be merged to `master` in this next release. "}}
{"actor":{"display_login":"dancannon"}}