You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-24 23:16:47 +02:00
#56 nil map or array should be null not [] or {}
This commit is contained in:
@ -228,7 +228,7 @@ func Test_write_array(t *testing.T) {
|
||||
func Test_write_val_array(t *testing.T) {
|
||||
should := require.New(t)
|
||||
val := []int{1, 2, 3}
|
||||
str, err := MarshalToString(val)
|
||||
str, err := MarshalToString(&val)
|
||||
should.Nil(err)
|
||||
should.Equal("[1,2,3]", str)
|
||||
}
|
||||
|
Reference in New Issue
Block a user