1
0
mirror of https://github.com/json-iterator/go.git synced 2025-07-03 23:30:41 +02:00

#129 fix read map with reader, should use ReadMapCB instead of ReadObjectCB

This commit is contained in:
Tao Wen
2017-07-12 16:40:05 +08:00
parent 845d8438db
commit bd4364ab7c
3 changed files with 17 additions and 4 deletions

View File

@ -288,7 +288,7 @@ func (iter *Iterator) Read() interface{} {
return arr
case Object:
obj := map[string]interface{}{}
iter.ReadObjectCB(func(Iter *Iterator, field string) bool {
iter.ReadMapCB(func(Iter *Iterator, field string) bool {
obj[field] = iter.Read()
return true
})