revert vm OpStructFieldOmitEmptyMarshalJSON

This commit is contained in:
IncSW 2021-04-12 10:26:32 +03:00
parent ac14c18dbb
commit d12ffe2c66
No known key found for this signature in database
GPG Key ID: 89876FA64BFB2D57
1 changed files with 1 additions and 6 deletions

View File

@ -3646,13 +3646,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt
code = code.NextField code = code.NextField
break break
} }
iface := ptrToInterface(code, p)
if code.Nilcheck && encoder.IsNilForMarshaler(iface) {
code = code.NextField
break
}
b = append(b, code.EscapedKey...) b = append(b, code.EscapedKey...)
bb, err := appendMarshalJSON(code, b, iface, true) bb, err := appendMarshalJSON(code, b, ptrToInterface(code, p), true)
if err != nil { if err != nil {
return nil, err return nil, err
} }