forked from mirror/go-json
Fix
This commit is contained in:
parent
6466e00432
commit
66e706beb7
|
@ -170,6 +170,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod
|
|||
}
|
||||
}
|
||||
iface := (*interfaceHeader)(e.ptrToUnsafePtr(ptr))
|
||||
if iface == nil {
|
||||
b = encodeNull(b)
|
||||
b = encodeComma(b)
|
||||
code = code.next
|
||||
break
|
||||
}
|
||||
ctx.keepRefs = append(ctx.keepRefs, unsafe.Pointer(iface))
|
||||
if iface.ptr == nil {
|
||||
b = encodeNull(b)
|
||||
|
|
Loading…
Reference in New Issue