{"action":"created","issue":{"url":"https://api.github.com/repos/keybase/go-jsonw/issues/2","labels_url":"https://api.github.com/repos/keybase/go-jsonw/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/keybase/go-jsonw/issues/2/comments","events_url":"https://api.github.com/repos/keybase/go-jsonw/issues/2/events","html_url":"https://github.com/keybase/go-jsonw/issues/2","id":54395248,"number":2,"title":"Integer encode/decode round-trip converts to Float","user":{"login":"maxtaco","id":866815,"avatar_url":"https://avatars.githubusercontent.com/u/866815?v=3","gravatar_id":"","url":"https://api.github.com/users/maxtaco","html_url":"https://github.com/maxtaco","followers_url":"https://api.github.com/users/maxtaco/followers","following_url":"https://api.github.com/users/maxtaco/following{/other_user}","gists_url":"https://api.github.com/users/maxtaco/gists{/gist_id}","starred_url":"https://api.github.com/users/maxtaco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxtaco/subscriptions","organizations_url":"https://api.github.com/users/maxtaco/orgs","repos_url":"https://api.github.com/users/maxtaco/repos","events_url":"https://api.github.com/users/maxtaco/events{/privacy}","received_events_url":"https://api.github.com/users/maxtaco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-15T00:01:15Z","updated_at":"2015-01-15T00:16:51Z","closed_at":null,"body":"For example:\r\n\r\n```go\r\n\r\npackage main\r\n\r\nimport (\r\n\t\"encoding/json\"\r\n\t\"fmt\"\r\n)\r\n\r\nfunc main() {\r\n\tvar jsonBlob = []byte(`1421279923`)\r\n\tvar tmp interface{}\r\n\terr := json.Unmarshal(jsonBlob, &tmp)\r\n\tif err != nil {\r\n\t\tfmt.Println(\"error:\", err)\r\n\t}\r\n\tb, err := json.Marshal(tmp)\r\n\tif err != nil {\r\n\t\tfmt.Println(\"error:\", err)\r\n\t}\r\n\tfmt.Printf(\"%s\\n\", string(b))\r\n}\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/keybase/go-jsonw/issues/comments/70018960","html_url":"https://github.com/keybase/go-jsonw/issues/2#issuecomment-70018960","issue_url":"https://api.github.com/repos/keybase/go-jsonw/issues/2","id":70018960,"user":{"login":"maxtaco","id":866815,"avatar_url":"https://avatars.githubusercontent.com/u/866815?v=3","gravatar_id":"","url":"https://api.github.com/users/maxtaco","html_url":"https://github.com/maxtaco","followers_url":"https://api.github.com/users/maxtaco/followers","following_url":"https://api.github.com/users/maxtaco/following{/other_user}","gists_url":"https://api.github.com/users/maxtaco/gists{/gist_id}","starred_url":"https://api.github.com/users/maxtaco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxtaco/subscriptions","organizations_url":"https://api.github.com/users/maxtaco/orgs","repos_url":"https://api.github.com/users/maxtaco/repos","events_url":"https://api.github.com/users/maxtaco/events{/privacy}","received_events_url":"https://api.github.com/users/maxtaco/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T00:16:51Z","updated_at":"2015-01-15T00:16:51Z","body":"This seems to fix it:\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"encoding/json\"\r\n\t\"fmt\"\r\n\t\"strings\"\r\n)\r\n\r\nfunc main() {\r\n\tjsonBlob := `1421279923`\r\n\tdec := json.NewDecoder(strings.NewReader(jsonBlob))\r\n\tvar tmp interface{}\r\n\tdec.UseNumber()\r\n\terr := dec.Decode(&tmp)\r\n\tif err != nil {\r\n\t\tfmt.Println(\"error:\", err)\r\n\t}\r\n\tb, err := json.Marshal(tmp)\r\n\tif err != nil {\r\n\t\tfmt.Println(\"error:\", err)\r\n\t}\r\n\tfmt.Printf(\"%s\\n\", string(b))\r\n}\r\n\r\n```"}}