Documentation
¶
Index ¶
- Variables
- func AddCustomMarshaler[T any](marshal func(v reflect.Value, node *document.Node) error)
- func AddCustomUnmarshaler[T any](unmarshal func(node *document.Node, v reflect.Value) error)
- func AddCustomValueMarshaler[T any](marshal func(v reflect.Value, value *document.Value, format string) error)
- func AddCustomValueUnmarshaler[T any](unmarshal func(value *document.Value, v reflect.Value, format string) error)
- func Debug(s string, v ...interface{})
- func IsType[T any](rv reflect.Value) bool
- func Marshal(v interface{}, doc *document.Document) error
- func MarshalNode(v interface{}) (*document.Node, error)
- func MarshalNodeWithOptions(v interface{}, opts MarshalOptions) (*document.Node, error)
- func MarshalWithOptions(v interface{}, doc *document.Document, opts MarshalOptions) error
- func TypeAssert[T any](rv reflect.Value) (T, bool)
- func Unmarshal(doc *document.Document, v interface{}) error
- func UnmarshalNode(node *document.Node, v interface{}) error
- func UnmarshalNodeWithOptions(node *document.Node, v interface{}, opts UnmarshalOptions) error
- func UnmarshalWithOptions(doc *document.Document, v interface{}, opts UnmarshalOptions) error
- type CustomArshalerFlags
- type MarshalOptions
- type UnmarshalOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNeedPointer = errors.New("must unmarshal into pointer type or map")
View Source
var ErrStructOrMap = errors.New("can only decode into struct or map")
Functions ¶
func AddCustomMarshaler ¶
func AddCustomUnmarshaler ¶
func AddCustomValueMarshaler ¶
func MarshalNode ¶
func MarshalNodeWithOptions ¶
func MarshalNodeWithOptions(v interface{}, opts MarshalOptions) (*document.Node, error)
func MarshalWithOptions ¶
func MarshalWithOptions(v interface{}, doc *document.Document, opts MarshalOptions) error
func UnmarshalNode ¶
func UnmarshalNodeWithOptions ¶
func UnmarshalNodeWithOptions(node *document.Node, v interface{}, opts UnmarshalOptions) error
func UnmarshalWithOptions ¶
func UnmarshalWithOptions(doc *document.Document, v interface{}, opts UnmarshalOptions) error
Types ¶
type CustomArshalerFlags ¶
type CustomArshalerFlags uint8
func (CustomArshalerFlags) Has ¶
func (c CustomArshalerFlags) Has(f CustomArshalerFlags) bool
type MarshalOptions ¶
Click to show internal directories.
Click to hide internal directories.