Documentation
¶
Index ¶
- func GetJsonBool(b []byte, k string) bool
- func GetJsonBytes(b []byte, k string) []byte
- func GetJsonFloat64(b []byte, k string) float64
- func GetJsonInt(b []byte, k string) int
- func GetJsonInt64(b []byte, k string) int64
- func GetJsonObjectBytes(b []byte, k string) []byte
- func GetJsonObjectString(b []byte, k string) string
- func GetJsonObjectValue(b []byte) *fastjson.Value
- func GetJsonString(b []byte, k string) string
- func JsonMarshal(v interface{}) ([]byte, error)
- func JsonUnmarshal(data []byte, v interface{}) error
- func JsonUnmarshalFast(data []byte, v interface{}) error
- func JsonUnmarshalUseNumber(data []byte, v interface{}) error
- func JsonUnmarshalUseNumberFast(data []byte, v interface{}) error
- func JsonValid(b []byte) bool
- func JsonValidString(s string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetJsonBool ¶
func GetJsonBytes ¶
func GetJsonFloat64 ¶
func GetJsonInt ¶
func GetJsonInt64 ¶
func GetJsonObjectBytes ¶
func GetJsonObjectString ¶
func GetJsonObjectValue ¶
GetJsonObjectValue 例如: v.Get("a").Get("b").MarshalTo(nil)
func GetJsonString ¶
func JsonUnmarshalFast ¶
JsonUnmarshalFast 单遍 JSON 反序列化(跳过 JsonValid 预校验)。 适用于高频热路径:直接反序列化,失败时由反序列化错误返回。
func JsonUnmarshalUseNumber ¶
JsonUnmarshalUseNumber 反序列化 JSON;数字保留为 json.Number,避免雪花 ID 经 float64 丢精度。 适用于 audit 脱敏等解析到 interface{} / map[string]interface{} 后再 Marshal 的场景。
func JsonUnmarshalUseNumberFast ¶
JsonUnmarshalUseNumberFast 单遍反序列化(跳过 JsonValid),UseNumber 保留大整数精度。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.