MCPcopy Create free account
hub / github.com/segmentio/encoding / encodeInterface

Method encodeInterface

json/encode.go:815–817  ·  view source on GitHub ↗
(b []byte, p unsafe.Pointer)

Source from the content-addressed store, hash-verified

813}
814
815func (e encoder) encodeInterface(b []byte, p unsafe.Pointer) ([]byte, error) {
816 return Append(b, *(*any)(p), e.flags)
817}
818
819func (e encoder) encodeMaybeEmptyInterface(b []byte, p unsafe.Pointer, t reflect.Type) ([]byte, error) {
820 return Append(b, reflect.NewAt(t, p).Elem().Interface(), e.flags)

Callers

nothing calls this directly

Calls 1

AppendFunction · 0.70

Tested by

no test coverage detected