mirror of https://github.com/goccy/go-json.git
fix: enable isNilCheck on MarshalJson ptr
This commit is contained in:
parent
df897aec9d
commit
92e091e9bb
|
@ -668,7 +668,7 @@ func (c *Compiler) structFieldCode(structCode *StructCode, tag *runtime.StructTa
|
|||
}
|
||||
fieldCode.value = code
|
||||
fieldCode.isAddrForMarshaler = true
|
||||
fieldCode.isNilCheck = false
|
||||
fieldCode.isNilCheck = true
|
||||
case isPtr && c.isPtrMarshalTextType(fieldType):
|
||||
// *struct{ field T }
|
||||
// func (*T) MarshalText() ([]byte, error)
|
||||
|
|
Loading…
Reference in New Issue