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

test read string and read string as slice

This commit is contained in:
Tao Wen
2017-01-16 23:57:09 +08:00
parent e7ff7339b2
commit 6efc6c44ac
4 changed files with 62 additions and 84 deletions

View File

@ -55,7 +55,7 @@ func (iter *Iterator) readObjectStart() bool {
}
func (iter *Iterator) readObjectField() (ret string) {
str := iter.readStringAsBytes()
str := iter.ReadStringAsSlice()
if iter.skipWhitespacesWithoutLoadMore() {
if ret == "" {
ret = string(str)