Documentation
¶
Index ¶
- func DecodeJSON(reader io.Reader, target interface{}) error
- func DecodeYAML(reader io.Reader, target interface{}) error
- func MarshalBaseYAML[B any](c BaseConverter[B]) ([]byte, error)
- func MarshalYAML(v interface{}) ([]byte, error)
- func UnmarshalBaseYAML[B any](data []byte, c BaseConverter[B]) error
- func UnmarshalYAML(data []byte, target interface{}) error
- type BaseConverter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJSON ¶
DecodeJSON decodes JSON from a reader into the target. Unknown fields in the input are rejected.
func DecodeYAML ¶
DecodeYAML decodes YAML from a reader into the target.
func MarshalBaseYAML ¶
func MarshalBaseYAML[B any](c BaseConverter[B]) ([]byte, error)
MarshalBaseYAML marshals a BaseConverter by serializing its base type to YAML bytes.
func MarshalYAML ¶
MarshalYAML marshals an object to YAML bytes.
func UnmarshalBaseYAML ¶
func UnmarshalBaseYAML[B any](data []byte, c BaseConverter[B]) error
UnmarshalBaseYAML unmarshals YAML into a BaseConverter through its base type.
func UnmarshalYAML ¶
UnmarshalYAML unmarshals YAML bytes into the provided target.
Types ¶
type BaseConverter ¶
type BaseConverter[Base any] interface { ToBase() Base FromBase(*Base) }
BaseConverter maps between a wrapper type and its base generated type.
Click to show internal directories.
Click to hide internal directories.