mirror of
https://github.com/json-iterator/go.git
synced 2025-01-20 18:48:32 +02:00
14 lines
276 B
Go
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)
|
|
} |