You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-11-29 22:47:28 +02:00
fix #291 omit empty was not handled properly for json raw message
This commit is contained in:
@@ -1,10 +1,18 @@
|
||||
package test
|
||||
|
||||
import "encoding/json"
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
func init() {
|
||||
marshalCases = append(marshalCases,
|
||||
json.RawMessage("{}"),
|
||||
selectedMarshalCase{struct {
|
||||
Env string `json:"env"`
|
||||
Extra json.RawMessage `json:"extra,omitempty"`
|
||||
}{
|
||||
Env: "jfdk",
|
||||
}},
|
||||
)
|
||||
unmarshalCases = append(unmarshalCases, unmarshalCase{
|
||||
ptr: (*json.RawMessage)(nil),
|
||||
|
||||
Reference in New Issue
Block a user