Documentation ¶
Index ¶
- Variables
- func MarshalByAPI(api sonic.API, v interface{}) ([]byte, error)
- func MarshalByAPIWithIndent(api sonic.API, v interface{}, prefix, indent string) ([]byte, error)
- func MarshalToStringByAPI(api sonic.API, v interface{}) (string, error)
- func MarshalToStringByAPIWithIndent(api sonic.API, v interface{}, prefix, indent string) (string, error)
- func NewDecoder(api sonic.API, reader io.Reader) sonic.Decoder
- func NewEncoder(api sonic.API, writer io.Writer) sonic.Encoder
- func UnmarshalByAPI(api sonic.API, data []byte, v interface{}) error
- func UnmarshalFromStringByAPI(api sonic.API, str string, v interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Marshal func(v interface{}) ([]byte, error) = sonic.Marshal MarshalToString func(v interface{}) (string, error) = sonic.MarshalString )
View Source
var ( Unmarshal func(buf []byte, val interface{}) error = sonic.Unmarshal UnmarshalFromString func(buf string, val interface{}) error = sonic.UnmarshalString )
Functions ¶
func MarshalByAPIWithIndent ¶
MarshalByAPIWithIndent
@param prefix 一般为"" @param indent 推荐值: "\t" || " "(4个空格)
func MarshalToStringByAPIWithIndent ¶
func MarshalToStringByAPIWithIndent(api sonic.API, v interface{}, prefix, indent string) (string, error)
MarshalToStringByAPIWithIndent
@param prefix 一般为"" @param indent 推荐值: "\t" || " "(4个空格)
func NewDecoder ¶
NewDecoder 解码器(from json)
func NewEncoder ¶
NewEncoder 编码器(to json)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.