Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Marshal ¶
func Marshal(v interface{}, options ...MarshalOption) ([]byte, error)
Marshal encode value to json data, without html escape
func MarshalString ¶ added in v2.3.0
func MarshalString(v interface{}, options ...MarshalOption) (string, error)
MarshalString encode value to json string, without html escape
func UnMarshal ¶
UnMarshal parse json encoded data to value, return the value. param T: the T can be pointer type, or plain value type.
func UnMarshalString ¶ added in v2.3.0
UnMarshal parse json encoded string to value, return the value. param T: the T can be pointer type, or plain value type.
Types ¶
type MarshalOption ¶ added in v2.3.0
MarshalOption set marshal behavers for json marshal
func WithIndent ¶ added in v2.3.0
func WithIndent(indent string) MarshalOption
WithIndent set indent for json marshal
Click to show internal directories.
Click to hide internal directories.