Documentation
¶
Overview ¶
Package json 提供封装其他 json 序列化框架的接口。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(m MarshalFunc, u UnmarshalFunc)
Init 自定义 Marshal 和 Unmarshal 函数,为了防止在一个项目中存在多个 json 序列化框架,该函数只能在项目 main 函数执行前的 init 阶段设置一次。
func MarshalIndent ¶
MarshalIndent 序列化 json 数据并对结果进行美化。
Types ¶
type MarshalFunc ¶
MarshalFunc 定义 Marshal 函数原型。
type UnmarshalFunc ¶
UnmarshalFunc 定义 Unmarshal 函数原型。
Click to show internal directories.
Click to hide internal directories.