Documentation ¶
Index ¶
- Variables
- func MustJSON(v any) []byte
- func MustJSONIndent(v any) []byte
- func MustJSONIndentString(v any) string
- func MustJSONString(v any) string
- func MustJSONUnEscape(v any) []byte
- func MustJSONUnEscapeIndent(v any) []byte
- func MustJSONUnEscapeIndentString(v any) string
- func MustJSONUnEscapeString(v any) string
- type RawMessage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Name = "go_json" Marshal = json.Marshal Unmarshal = json.Unmarshal MarshalIndent = json.MarshalIndent NewDecoder = json.NewDecoder NewEncoder = json.NewEncoder )
Functions ¶
func MustJSONIndentString ¶
MustJSONIndentString 转 json 返回 string
func MustJSONUnEscape ¶ added in v0.0.16
MustJSONUnEscape 转 json 返回 []byte, 不转义 ( '&', '<', '>' )
func MustJSONUnEscapeIndent ¶ added in v0.0.16
MustJSONUnEscapeIndent 转 json 返回 []byte, 不转义 ( '&', '<', '>' )
func MustJSONUnEscapeIndentString ¶ added in v0.0.16
MustJSONUnEscapeIndentString 转 json 返回 string, 不转义 ( '&', '<', '>' )
func MustJSONUnEscapeString ¶ added in v0.0.16
MustJSONUnEscapeString 转 json 返回 string, 不转义 ( '&', '<', '>' )
Types ¶
type RawMessage ¶
type RawMessage []byte
func (RawMessage) MarshalJSON ¶
func (m RawMessage) MarshalJSON() ([]byte, error)
MarshalJSON returns m as the JSON encoding of m.
func (*RawMessage) UnmarshalJSON ¶
func (m *RawMessage) UnmarshalJSON(data []byte) error
UnmarshalJSON sets *m to a copy of data.
Click to show internal directories.
Click to hide internal directories.