{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/18009","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/18009/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/18009/comments","events_url":"https://api.github.com/repos/golang/go/issues/18009/events","html_url":"https://github.com/golang/go/issues/18009","id":190854508,"number":18009,"title":"encoding/json: unexported embedded fields are marshalled, but cannot be unmarshalled","user":{"login":"jba","id":18483045,"avatar_url":"https://avatars.githubusercontent.com/u/18483045?v=3","gravatar_id":"","url":"https://api.github.com/users/jba","html_url":"https://github.com/jba","followers_url":"https://api.github.com/users/jba/followers","following_url":"https://api.github.com/users/jba/following{/other_user}","gists_url":"https://api.github.com/users/jba/gists{/gist_id}","starred_url":"https://api.github.com/users/jba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jba/subscriptions","organizations_url":"https://api.github.com/users/jba/orgs","repos_url":"https://api.github.com/users/jba/repos","events_url":"https://api.github.com/users/jba/events{/privacy}","received_events_url":"https://api.github.com/users/jba/received_events","type":"User","site_admin":false},"labels":[{"id":373399998,"url":"https://api.github.com/repos/golang/go/labels/NeedsFix","name":"NeedsFix","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/49","html_url":"https://github.com/golang/go/milestones/Go1.9","labels_url":"https://api.github.com/repos/golang/go/milestones/49/labels","id":2053058,"number":49,"title":"Go1.9","description":"","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":272,"closed_issues":11,"state":"open","created_at":"2016-10-06T18:17:55Z","updated_at":"2016-11-22T11:33:38Z","due_on":"2017-07-31T00:00:00Z","closed_at":null},"comments":2,"created_at":"2016-11-21T22:29:31Z","updated_at":"2016-11-22T12:50:52Z","closed_at":null,"body":"encoding/json will marshal field foo in\r\n```go\r\ntype S struct{ foo }\r\ntype foo int\r\n```\r\nBut since foo is unexported, unmarshalling panics.\r\n\r\n### What version of Go are you using (`go version`)?\r\n\r\n1.7.3\r\n\r\n\r\n### What operating system and processor architecture are you using (`go env`)?\r\n\r\nlinux amd64 \r\n### What did you do?\r\n\r\nhttps://play.golang.org/p/P4iGGhkOAB\r\n\r\n### What did you expect to see?\r\n\r\n\"{}\" \r\n\r\nThe only field of S is unexported, so it shouldn't marshal.\r\n\r\n### What did you see instead?\r\n\r\n{\"foo\":1}\r\n\r\nand panic on unmarshal.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/262232589","html_url":"https://github.com/golang/go/issues/18009#issuecomment-262232589","issue_url":"https://api.github.com/repos/golang/go/issues/18009","id":262232589,"user":{"login":"jba","id":18483045,"avatar_url":"https://avatars.githubusercontent.com/u/18483045?v=3","gravatar_id":"","url":"https://api.github.com/users/jba","html_url":"https://github.com/jba","followers_url":"https://api.github.com/users/jba/followers","following_url":"https://api.github.com/users/jba/following{/other_user}","gists_url":"https://api.github.com/users/jba/gists{/gist_id}","starred_url":"https://api.github.com/users/jba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jba/subscriptions","organizations_url":"https://api.github.com/users/jba/orgs","repos_url":"https://api.github.com/users/jba/repos","events_url":"https://api.github.com/users/jba/events{/privacy}","received_events_url":"https://api.github.com/users/jba/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T12:50:51Z","updated_at":"2016-11-22T12:50:51Z","body":"To be clear, the bug is in marshalling the unexported field, right?\r\n\r\nMy fix for the problem in my generalized field-selection package: https://code-review.googlesource.com/9485. "}}
{"actor":{"display_login":"jba"}}