1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-24 23:16:47 +02:00

#61 removed internal buffer from lazy array and object; jsoniter.Get replaced jsoniter.UnmarshalAny

This commit is contained in:
Tao Wen
2017-06-18 22:21:54 +08:00
parent 1ec246d16b
commit 985e263300
17 changed files with 252 additions and 792 deletions

View File

@ -11,15 +11,4 @@ func Test_wrap_map(t *testing.T) {
should.Equal("hello", any.Get("Field1").ToString())
any = Wrap(map[string]string{"Field1": "hello"})
should.Equal(1, any.Size())
any = Wrap(map[string]string{"Field1": "hello"})
vals := map[string]string{}
var k string
var v Any
for next, hasNext := any.IterateObject(); hasNext; {
k, v, hasNext = next()
if v.ValueType() == String {
vals[k] = v.ToString()
}
}
should.Equal(map[string]string{"Field1": "hello"}, vals)
}