1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-15 22:50:24 +02:00

optimize read string

This commit is contained in:
Tao Wen
2016-12-06 14:23:59 +08:00
parent c457aeaac2
commit c44e7c496a
3 changed files with 70 additions and 4 deletions

View File

@ -3,6 +3,7 @@ package jsoniter
import (
"testing"
"encoding/json"
"fmt"
)
func Test_empty_object(t *testing.T) {
@ -17,6 +18,7 @@ func Test_one_field(t *testing.T) {
iter := ParseString(`{"a": "b"}`)
field := iter.ReadObject()
if field != "a" {
fmt.Println(iter.Error)
t.Fatal(field)
}
value := iter.ReadString()