You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-24 23:16:47 +02:00
add Any.ToVal
This commit is contained in:
@ -41,6 +41,9 @@ func Test_read_two_element_array_as_any(t *testing.T) {
|
||||
stream := NewStream(ConfigDefault, nil, 32)
|
||||
any.WriteTo(stream)
|
||||
should.Equal("[1,2]", string(stream.Buffer()))
|
||||
arr := []int{}
|
||||
any.ToVal(&arr)
|
||||
should.Equal([]int{1, 2}, arr)
|
||||
}
|
||||
|
||||
func Test_wrap_array(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user