In encoding/json:
Unmarshal matches incoming object keys to the keys used by Marshal (either the struct field name or its tag), preferring an exact match but also accepting a case-insensitive match
We can confirm this behavior (see playground): if our struct defines a tag with a different case, it will fall back to it, but if there are 2 fields, 1 with the right, 1 with the wrong case, it will select the correct one.
However, in this specific case, mapstructure handles things differently (see playground): the field is present twice, with both the case-correct and case-incorrect values.
