{"action":"closed","issue":{"url":"https://api.github.com/repos/vmihailenco/msgpack/issues/59","labels_url":"https://api.github.com/repos/vmihailenco/msgpack/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/vmihailenco/msgpack/issues/59/comments","events_url":"https://api.github.com/repos/vmihailenco/msgpack/issues/59/events","html_url":"https://github.com/vmihailenco/msgpack/issues/59","id":124314671,"number":59,"title":"inconsistency in encoding of float32 inside a struct and when outside","user":{"login":"algrebe","id":1938871,"avatar_url":"https://avatars.githubusercontent.com/u/1938871?v=3","gravatar_id":"","url":"https://api.github.com/users/algrebe","html_url":"https://github.com/algrebe","followers_url":"https://api.github.com/users/algrebe/followers","following_url":"https://api.github.com/users/algrebe/following{/other_user}","gists_url":"https://api.github.com/users/algrebe/gists{/gist_id}","starred_url":"https://api.github.com/users/algrebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algrebe/subscriptions","organizations_url":"https://api.github.com/users/algrebe/orgs","repos_url":"https://api.github.com/users/algrebe/repos","events_url":"https://api.github.com/users/algrebe/events{/privacy}","received_events_url":"https://api.github.com/users/algrebe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-30T07:29:17Z","updated_at":"2015-12-30T11:38:20Z","closed_at":"2015-12-30T11:38:20Z","body":"I've previously been using [github.com/ugorji/go/codec](https://github.com/ugorji/go/) and recently moved over to yours.\r\n\r\nA normal float32 of value 0 gets encoded into `[202 0 0 0 0]` in both yours and ugorjis\r\nBut when inside a struct\r\n```go\r\ntype TestStruct struct {\r\n    MyFloat float32\r\n}\r\n```\r\nWhen this gets encoded ( with MyFloat being 0), the value becomes `[129 163 78 117 109 203 0 0 0 0 0 0 0 0]`\r\n\r\nThe same on ugorji is `[129 163 78 117 109 202 0 0 0 0]`\r\n\r\nThere are two differences\r\n1. extra 4 zeroes ( I'm not facing any issue with this but shouldn't it be 4 bytes instead of 8 ? )\r\n2. The code 203 is being used instead of 202.\r\n\r\nI'm having an issue with the second difference since decoding ugorji encodings with your decoder is causing it to panic \r\n```\r\nfailed to decode ugorji encoding...msgpack: invalid code ca decoding float64\r\n\tpanic: msgpack: invalid code ca decoding float64\r\n```\r\n\r\nHere is a [detailed comparison](https://gist.github.com/algrebe/a021d9ce27cb8153d82f) to recreate the same."}}