mirror of
https://github.com/json-iterator/go.git
synced 2025-01-08 13:06:29 +02:00
adapter
This commit is contained in:
parent
d80d954345
commit
cb86934dc8
9
jsoniter_adapter.go
Normal file
9
jsoniter_adapter.go
Normal file
@ -0,0 +1,9 @@
|
||||
package jsoniter
|
||||
|
||||
// adapt to json/encoding api
|
||||
|
||||
func Unmarshal(data []byte, v interface{}) error {
|
||||
iter := ParseBytes(data)
|
||||
iter.Read(v)
|
||||
return iter.Error
|
||||
}
|
Loading…
Reference in New Issue
Block a user