Commit 32d1e460 authored by Russ Cox's avatar Russ Cox

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

R=golang-dev, bradfitz, iant
CC=golang-dev
https://golang.org/cl/5127043
parent 8f699a3f
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment