func (r *Request) DecodeJsonPayload(v interface{}) error {
	content, err := ioutil.ReadAll(r.Body)
	r.Body.Close()
	if err != nil {
		return err
	}
	if len(content) == 0 {
		return ErrJsonPayloadEmpty
	}
	err = json.Unmarshal(content, v)
	if err != nil {
		return err
	}
	return nil
}
func (r *Request) DecodeJsonPayload(v interface{}) error {
	content, err := ioutil.ReadAll(r.Body)
	r.Body.Close()
	if err != nil {
		return err
	}
	if len(content) == 0 {
		return ErrJsonPayloadEmpty
	}
	err = json.Unmarshal(content, v)
	if err != nil {
		return err
	}
	return nil
}
func ( r * Request ) DecodeJsonPayload ( v interface { } ) error { content , err := ioutil . ReadAll ( r . Body ) r . Body . Close ( ) if err != nil { return err } if len ( content ) == 0 { return ErrJsonPayloadEmpty } err = json . Unmarshal ( content , v ) if err != nil { return err } return nil }
// DecodeJsonPayload reads the request body and decodes the JSON using json.Unmarshal.
DecodeJsonPayload reads the request body and decodes the JSON using json . Unmarshal .