|
@@ -146,16 +146,6 @@ func Test_write_array_of_interface_in_struct(t *testing.T) {
|
|
|
should.Contains(str, `"Field2":""`)
|
|
should.Contains(str, `"Field2":""`)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-func Test_json_RawMessage(t *testing.T) {
|
|
|
|
|
- should := require.New(t)
|
|
|
|
|
- var data json.RawMessage
|
|
|
|
|
- should.Nil(Unmarshal([]byte(`[1,2,3]`), &data))
|
|
|
|
|
- should.Equal(`[1,2,3]`, string(data))
|
|
|
|
|
- str, err := MarshalToString(data)
|
|
|
|
|
- should.Nil(err)
|
|
|
|
|
- should.Equal(`[1,2,3]`, str)
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
func Test_encode_byte_array(t *testing.T) {
|
|
func Test_encode_byte_array(t *testing.T) {
|
|
|
should := require.New(t)
|
|
should := require.New(t)
|
|
|
bytes, err := json.Marshal([]byte{1, 2, 3})
|
|
bytes, err := json.Marshal([]byte{1, 2, 3})
|