1
0
mirror of https://github.com/json-iterator/go.git synced 2025-01-20 18:48:32 +02:00
json-iterator/jsoniter_interface_test.go
2017-01-09 21:00:01 +08:00

14 lines
276 B
Go

package jsoniter
import (
"testing"
"github.com/json-iterator/go/require"
)
func Test_write_array_of_interface(t *testing.T) {
should := require.New(t)
array := []interface{}{"hello"}
str, err := MarshalToString(array)
should.Nil(err)
should.Equal(`["hello"]`, str)
}