Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnmarshalByReflection ¶
func UnmarshalByReflection( reader io.Reader, dest interface{}, unmarshalOptions *protojson.UnmarshalOptions, ) error
UnmarshalByReflection decodes JSON from io.Reader into a destination, handling nested proto.Message fields.
Parameters:
- r: The io.Reader to read JSON data from
- dest: The destination to decode the JSON data into
- unmarshalOptions: Options for unmarshalling proto messages (optional, can be nil)
Returns:
- error: The error if any
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 ¶
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
Click to show internal directories.
Click to hide internal directories.