encoding/json: Unmarshal inserts map keys when the value is not appropriate for the map type #42508
Labels
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Output:
I think this violates the principle of least astonishment, "b" key shouldn't appear in the output
x
map.The relevant part of the documentation for
json.Unmarshal()
is:It doesn't seem to me that it describes the above behaviour.
The text was updated successfully, but these errors were encountered: