http://golang.org/src/encoding/json/decode.go?s=2621:2669#L64
To unmarshal a JSON object into a map, Unmarshal replaces the map with an empty map and then adds key-value pairs from the object to the map.
But, while unmarshalling it behaves differently.
http://play.golang.org/p/HTjkkCEQBV
var r map[string]string
j := []byte(`{"hello": "world"}`)
json.Unmarshal(j, &r)
fmt.Println(r)
// map[string]string{"hello":"world"}
ja := []byte(`{"world": "hello"}`)
json.Unmarshal(j, &r)
fmt.Println(r)
// map[string]string{"hello":"world", "world":"hello"}
// expected to eq map[string]string{"world": "hello"}
I'm totally in favor of this behavior but what docs is saying isn't correct.
That make sense?