1
0
mirror of https://github.com/json-iterator/go.git synced 2025-04-20 11:28:49 +02:00
json-iterator/value_tests/raw_message_test.go
2020-01-14 14:14:02 +08:00

28 lines
524 B
Go

package test
import (
"encoding/json"
)
func init() {
marshalCases = append(marshalCases,
json.RawMessage("{}"),
json.RawMessage("12345"),
json.RawMessage("3.14"),
json.RawMessage("-0.5e10"),
struct {
Env string `json:"env"`
Extra json.RawMessage `json:"extra,omitempty"`
}{
Env: "jfdk",
},
)
unmarshalCases = append(unmarshalCases, unmarshalCase{
ptr: (*json.RawMessage)(nil),
input: `[1,2,3]`,
}, unmarshalCase{
ptr: (*json.RawMessage)(nil),
input: `1.122e+250`,
})
}