diff --git a/internal/encoder/vm_escaped/vm.go b/internal/encoder/vm_escaped/vm.go index 846119b..b0c608f 100644 --- a/internal/encoder/vm_escaped/vm.go +++ b/internal/encoder/vm_escaped/vm.go @@ -3646,13 +3646,8 @@ func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet, opt code = code.NextField break } - iface := ptrToInterface(code, p) - if code.Nilcheck && encoder.IsNilForMarshaler(iface) { - code = code.NextField - break - } b = append(b, code.EscapedKey...) - bb, err := appendMarshalJSON(code, b, iface, true) + bb, err := appendMarshalJSON(code, b, ptrToInterface(code, p), true) if err != nil { return nil, err }