Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func NewDecoder() *Decoder
NewDecoder creates a new Decoder instance
Returns:
- *Decoder: The decoder instance
func (Decoder) Decode ¶
Decode decodes the JSON body from an any value and stores it in the destination
Parameters:
- body: The body to decode
- dest: The destination to store the decoded body
Returns:
- error: The error if any
func (Decoder) DecodeReader ¶ added in v0.12.2
DecodeReader decodes a JSON body from a reader into a destination
Parameters:
- reader: The io.Reader to read the body from
- dest: The destination to decode the body into
Returns:
- error: The error if any
func (Decoder) DecodeRequest ¶ added in v0.12.2
DecodeRequest decodes a JSON body from an HTTP request into a destination
Parameters:
- request: The HTTP request to read the body from
- dest: The destination to decode the body into
Returns:
- error: The error if any
Click to show internal directories.
Click to hide internal directories.