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) }