mirror of
https://github.com/json-iterator/go.git
synced 2024-11-27 08:30:57 +02:00
fix struct decoder report error
This commit is contained in:
parent
86e9fd72bc
commit
414d0307c9
@ -995,7 +995,7 @@ func (decoder *structFieldDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) {
|
||||
fieldPtr := decoder.field.UnsafeGet(ptr)
|
||||
decoder.fieldDecoder.Decode(fieldPtr, iter)
|
||||
if iter.Error != nil && iter.Error != io.EOF {
|
||||
iter.Error = fmt.Errorf("%s: %s", decoder.field.Name, iter.Error.Error())
|
||||
iter.Error = fmt.Errorf("%s: %s", decoder.field.Name(), iter.Error.Error())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user