json: use strings.EqualFold instead of strings.ToLower.

R=golang-dev, bradfitz, iant
CC=golang-dev
https://golang.org/cl/5127043
This commit is contained in:
Russ Cox 2011-09-28 12:00:45 -04:00
parent 8f699a3fb9
commit 32d1e46058

View file

@ -504,7 +504,7 @@ func (d *decodeState) object(v reflect.Value) {
}
// Third, case-insensitive field name match,
// but only if a better match hasn't already been seen
if !ok && strings.ToLower(sf.Name) == strings.ToLower(key) {
if !ok && strings.EqualFold(sf.Name, key) {
f = sf
ok = true
}