Permalink
Browse files

Formated, doced. Also fixed few minor bugs.

  • Loading branch information...
1 parent 97849e0 commit d63a00f0bf185a7c739e81f5634f60ee0ad80b2c @hanbang-wang hanbang-wang committed Jan 5, 2017
View
@@ -1,3 +1,5 @@
+[![rcard](https://goreportcard.com/badge/github.com/json-iterator/go)](https://goreportcard.com/report/github.com/json-iterator/go)
+
jsoniter (json-iterator) is fast and flexible JSON parser available in [Java](https://github.com/json-iterator/java) and [Go](https://github.com/json-iterator/go)
# Why jsoniter?
@@ -37,7 +39,7 @@ import "github.com/json-iterator/go"
iter := ParseString(`[0, [1, 2], [3, 4], 5]`)
count := 0
for iter.ReadArray() {
- iter.skip()
+ iter.Skip()
count++
}
fmt.Println(count) // 4
View
@@ -1,8 +1,8 @@
package jsoniter
import (
- "testing"
"fmt"
+ "testing"
)
func Test_get_from_map(t *testing.T) {
@@ -36,7 +36,7 @@ func Test_is_null(t *testing.T) {
any := Any{val: []interface{}{
1, 2, 3,
}}
- if any.IsNull() != false {
+ if any.IsNil() != false {
t.FailNow()
}
}
View
@@ -2,8 +2,7 @@ package jsoniter
import "io"
-// adapt to json/encoding api
-
+// Unmarshal adapts to json/encoding APIs
func Unmarshal(data []byte, v interface{}) error {
iter := ParseBytes(data)
iter.Read(v)
Oops, something went wrong.

0 comments on commit d63a00f

Please sign in to comment.