Documentation ¶
Index ¶
- func MarshalJSON(c ctx.C, from any) ([]byte, error)
- func MustMarshalJSON(c ctx.C, from any) []byte
- func Unmarshal(c ctx.C, n Node, into any) error
- func UnmarshalJSON(c ctx.C, j []byte, into any) error
- type Bool
- type Codec
- type Handler
- type JSON
- type List
- type Map
- type Marshaler
- type Nil
- type Node
- type Number
- type Pair
- type Pairs
- type ReadWriteCloser
- type ReadWriter
- type Reader
- type ReaderCloser
- type String
- type Tag
- type Unmarshaler
- type WriteCloser
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler struct { Factory map[reflect.Type]func(c ctx.C, n Node) (any, error) // called if a field is present in the NodeTree but there is no mapping on the object it's unmarshaled into UnhandledFields func(c ctx.C, path []any, n Node) error Debugf func(c ctx.C, f string, args ...any) // contains filtered or unexported fields }
generic object that do the Unmarshal()/Conflate()
type Node ¶
type Pairs ¶
type Pairs []Pair
ordered pairs, used mostly internally when Unmarshalling structs, to preserve the order of the fields can be used anywhere else where the order matters Note(oha): currently not used while decoding, to keep the decode stack simple and easy, might be changed in the future?
func (Pairs) MarshalJSON ¶
type ReadWriter ¶
type ReaderCloser ¶
type Unmarshaler ¶
objects which implements this can override how their data is unmarshaled (Expand)
type WriteCloser ¶
Click to show internal directories.
Click to hide internal directories.