diff --git a/jsoniter_adapter.go b/jsoniter_adapter.go new file mode 100644 index 0000000..f18037a --- /dev/null +++ b/jsoniter_adapter.go @@ -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 +}