mirror of
https://github.com/json-iterator/go.git
synced 2025-01-23 18:54:21 +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…
x
Reference in New Issue
Block a user