decoder

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBodyTooLarge = errors.New("body too large")
View Source
var ErrInvalidJSON = errors.New("invalid json")

Functions

func DecodeJSONBody

func DecodeJSONBody(r *http.Request, out interface{}) error

DecodeJSONBody decodes a JSON request body. Call errors.Is(err, ErrBodyTooLarge) or errors.Is(err, ErrInvalidJSON). DecodeJSONBody 解码 JSON 请求体。 调用 errors.Is(err, ErrBodyTooLarge) 或 errors.Is(err, ErrInvalidJSON) 判断错误。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL