Documentation
¶
Overview ¶
Package yaml implements a YAML Marshaler.
Index ¶
- type Yaml
- func (j *Yaml) ContentTypes() []string
- func (j *Yaml) Exts() []string
- func (j *Yaml) Marshal(v any) ([]byte, error)
- func (j *Yaml) Marshals(v any) bool
- func (j *Yaml) Name() string
- func (j *Yaml) NewDecoder(r io.Reader) codecs.Decoder
- func (j *Yaml) NewEncoder(w io.Writer) codecs.Encoder
- func (j *Yaml) Unmarshal(data []byte, v any) error
- func (j *Yaml) Unmarshals(v any) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Yaml ¶
type Yaml struct{}
Yaml implements the codecs.Marshaler interface. It can be used to encode/decode yaml files, or web requests.
func (*Yaml) ContentTypes ¶
ContentTypes returns the content types the marshaller can handle.
func (*Yaml) NewDecoder ¶
NewDecoder returns a new JSON/ProtocolBuffer decoder.
func (*Yaml) NewEncoder ¶
NewEncoder returns a new JSON/ProtocolBuffer encoder.
func (*Yaml) Unmarshal ¶ added in v0.2.0
Unmarshal decodes yaml bytes into object v. Param v should be a pointer type.
func (*Yaml) Unmarshals ¶ added in v0.2.0
Unmarshals returns if this is able to decode the given type.
Click to show internal directories.
Click to hide internal directories.