Documentation
¶
Index ¶
- type Engine
- func (e *Engine) Marshal(value interface{}) ([]byte, error)
- func (e *Engine) MarshalPtr(value interface{}) ([]byte, error)
- func (e *Engine) MarshalPtrTo(dst []byte, value interface{}) ([]byte, error)
- func (e *Engine) MarshalTo(dst []byte, value interface{}) ([]byte, error)
- func (e *Engine) MarshalTypedPtr(dst []byte, elemType reflect.Type, ptr unsafe.Pointer) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
NameTransform func(path []string, field string) string
Exclude func(path []string, field string) bool
// contains filtered or unexported fields
}
Engine marshals values with transform/exclusion hooks.
func (*Engine) MarshalPtr ¶
MarshalPtr marshals pointer roots on the fast pointer path.
func (*Engine) MarshalPtrTo ¶
MarshalPtrTo appends pointer-root marshaled JSON to dst.
Click to show internal directories.
Click to hide internal directories.