2018-02-13 23:49:40 +08:00
|
|
|
package test
|
|
|
|
|
2018-08-06 13:58:33 +08:00
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
)
|
2018-02-13 23:49:40 +08:00
|
|
|
|
|
|
|
func init() {
|
|
|
|
marshalCases = append(marshalCases,
|
|
|
|
json.RawMessage("{}"),
|
2018-10-24 23:28:41 +08:00
|
|
|
struct {
|
2018-08-06 13:58:33 +08:00
|
|
|
Env string `json:"env"`
|
|
|
|
Extra json.RawMessage `json:"extra,omitempty"`
|
|
|
|
}{
|
|
|
|
Env: "jfdk",
|
2018-10-24 23:28:41 +08:00
|
|
|
},
|
2018-02-13 23:49:40 +08:00
|
|
|
)
|
2018-02-14 08:58:59 +08:00
|
|
|
unmarshalCases = append(unmarshalCases, unmarshalCase{
|
2018-02-24 22:04:41 +08:00
|
|
|
ptr: (*json.RawMessage)(nil),
|
2018-02-14 08:58:59 +08:00
|
|
|
input: `[1,2,3]`,
|
2018-11-12 14:45:56 +08:00
|
|
|
}, unmarshalCase{
|
|
|
|
ptr: (*json.RawMessage)(nil),
|
|
|
|
input: `1.122e+250`,
|
2018-02-14 08:58:59 +08:00
|
|
|
})
|
2018-02-13 23:49:40 +08:00
|
|
|
}
|