mirror of
https://github.com/json-iterator/go.git
synced 2025-01-08 13:06:29 +02:00
15 lines
217 B
Go
15 lines
217 B
Go
package jsoniter
|
|
|
|
import "io"
|
|
|
|
// adapt to json/encoding api
|
|
|
|
func Unmarshal(data []byte, v interface{}) error {
|
|
iter := ParseBytes(data)
|
|
iter.Read(v)
|
|
if iter.Error == io.EOF {
|
|
return nil
|
|
}
|
|
return iter.Error
|
|
}
|