1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-12 22:47:42 +02:00

array/object to bool/int

This commit is contained in:
Tao Wen
2017-01-24 23:13:58 +08:00
parent ee54218b0a
commit 94ae645ab9
4 changed files with 114 additions and 14 deletions

View File

@ -65,6 +65,8 @@ func Test_read_two_element_array_as_any(t *testing.T) {
should.Nil(err)
should.Equal(1, any.Get(0).ToInt())
should.Equal(2, any.Size())
should.True(any.ToBool())
should.Equal(1, any.ToInt())
}
func Test_read_array_with_any_iterator(t *testing.T) {