encoding/json: unmarshal accepts duplicate keys #24415
Labels
FrozenDueToAge
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
Unmarshaling a JSON object with repeated keys into a struct doesn't return an error, it keeps the value specified last in the JSON string instead.
https://play.golang.org/p/cv6HeD-hERx
More confusingly, it causes maps on repeated keys to be merged: https://play.golang.org/p/47_7kSPFCW2
Other languages' JSON libraries error in this case
The text was updated successfully, but these errors were encountered: