mirror of
https://github.com/json-iterator/go.git
synced 2024-11-24 08:22:14 +02:00
28 lines
543 B
Go
28 lines
543 B
Go
package test
|
|
|
|
func init() {
|
|
nilSlice := []string(nil)
|
|
marshalCases = append(marshalCases,
|
|
[]interface{}{"hello"},
|
|
nilSlice,
|
|
&nilSlice,
|
|
[]byte{1, 2, 3},
|
|
)
|
|
unmarshalCases = append(unmarshalCases, unmarshalCase{
|
|
ptr: (*[]string)(nil),
|
|
input: "null",
|
|
}, unmarshalCase{
|
|
ptr: (*[]string)(nil),
|
|
input: "[]",
|
|
}, unmarshalCase{
|
|
ptr: (*[]byte)(nil),
|
|
input: "[1,2,3]",
|
|
}, unmarshalCase{
|
|
ptr: (*[]byte)(nil),
|
|
input: `"aGVsbG8="`,
|
|
}, unmarshalCase{
|
|
ptr: (*[]byte)(nil),
|
|
input: `"c3ViamVjdHM\/X2Q9MQ=="`,
|
|
})
|
|
}
|