{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/12529","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/12529/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/12529/comments","events_url":"https://api.github.com/repos/golang/go/issues/12529/events","html_url":"https://github.com/golang/go/issues/12529","id":105170708,"number":12529,"title":"encoding/json: support int map keys in encoding/json","user":{"login":"allaud","id":364416,"avatar_url":"https://avatars.githubusercontent.com/u/364416?v=3","gravatar_id":"","url":"https://api.github.com/users/allaud","html_url":"https://github.com/allaud","followers_url":"https://api.github.com/users/allaud/followers","following_url":"https://api.github.com/users/allaud/following{/other_user}","gists_url":"https://api.github.com/users/allaud/gists{/gist_id}","starred_url":"https://api.github.com/users/allaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allaud/subscriptions","organizations_url":"https://api.github.com/users/allaud/orgs","repos_url":"https://api.github.com/users/allaud/repos","events_url":"https://api.github.com/users/allaud/events{/privacy}","received_events_url":"https://api.github.com/users/allaud/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/golang/go/labels/Thinking","name":"Thinking","color":"ffaaaa"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/31","html_url":"https://github.com/golang/go/milestones/Go1.7","labels_url":"https://api.github.com/repos/golang/go/milestones/31/labels","id":1414133,"number":31,"title":"Go1.7","description":"","creator":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"open_issues":267,"closed_issues":123,"state":"open","created_at":"2015-11-16T16:57:07Z","updated_at":"2016-03-19T10:19:15Z","due_on":"2016-07-31T07:00:00Z","closed_at":null},"comments":7,"created_at":"2015-09-07T08:23:01Z","updated_at":"2016-03-20T03:03:41Z","closed_at":null,"body":"Our team faced a strange issue with encoding map[int]string into json. Our current solution is to use patched json encoder, which can encode integer keys as strings.\r\n\r\nWhy not to implement this in the default module?"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/198838549","html_url":"https://github.com/golang/go/issues/12529#issuecomment-198838549","issue_url":"https://api.github.com/repos/golang/go/issues/12529","id":198838549,"user":{"login":"cespare","id":318501,"avatar_url":"https://avatars.githubusercontent.com/u/318501?v=3","gravatar_id":"","url":"https://api.github.com/users/cespare","html_url":"https://github.com/cespare","followers_url":"https://api.github.com/users/cespare/followers","following_url":"https://api.github.com/users/cespare/following{/other_user}","gists_url":"https://api.github.com/users/cespare/gists{/gist_id}","starred_url":"https://api.github.com/users/cespare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cespare/subscriptions","organizations_url":"https://api.github.com/users/cespare/orgs","repos_url":"https://api.github.com/users/cespare/repos","events_url":"https://api.github.com/users/cespare/events{/privacy}","received_events_url":"https://api.github.com/users/cespare/received_events","type":"User","site_admin":false},"created_at":"2016-03-20T03:03:41Z","updated_at":"2016-03-20T03:03:41Z","body":"@rsc, it seems like #12146 is likely to happen, and there's a CL out at https://golang.org/cl/20356.\r\n\r\nGiven that, you can make your integer keys work but you have to make your own int type with the obvious TestMarshaler/TextUnmarshaler methods.\r\n\r\nWhat are your thoughts about also doing this change? I still think it's worth doing, and I'd like to send a 1.7 CL if you agree."}}