mirror of
https://github.com/json-iterator/go.git
synced 2024-11-27 08:30:57 +02:00
eof is not error
This commit is contained in:
parent
69b742e73a
commit
5cb0d35610
@ -111,6 +111,10 @@ type AdaptedDecoder struct {
|
||||
|
||||
func (adapter *AdaptedDecoder) Decode(obj interface{}) error {
|
||||
adapter.iter.ReadVal(obj)
|
||||
err := adapter.iter.Error
|
||||
if err == io.EOF {
|
||||
return nil
|
||||
}
|
||||
return adapter.iter.Error
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user