mirror of
https://github.com/json-iterator/go.git
synced 2025-01-23 18:54:21 +02:00
#142 decode struct field should be case insensitiveyet another fix
This commit is contained in:
parent
24ecaff2a1
commit
34a2174be3
@ -429,7 +429,7 @@ func (decoder *generalStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator)
|
||||
}
|
||||
fieldBytes := iter.readObjectFieldAsBytes()
|
||||
field := *(*string)(unsafe.Pointer(&fieldBytes))
|
||||
fieldDecoder := decoder.fields[field]
|
||||
fieldDecoder := decoder.fields[strings.ToLower(field)]
|
||||
if fieldDecoder == nil {
|
||||
iter.Skip()
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user