Documentation ¶
Overview ¶
将自定义类型Encode/Decode成JSON的包。
Index ¶
- func DefaultMarshaler(v interface{}) ([]byte, error)
- func Marshal(v interface{}) ([]byte, error)
- func Register(name string, typ reflect.Type) error
- func RegisterCustom(name string, typ reflect.Type, marshal Marshaler, unmarshal Unmarshaler) error
- func Unmarshal(data []byte) (interface{}, error)
- type Marshaler
- type Unmarshaler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultMarshaler ¶
func RegisterCustom ¶
Types ¶
type Unmarshaler ¶
func TypeUnmarshalerOf ¶
func TypeUnmarshalerOf(typ reflect.Type) Unmarshaler
Click to show internal directories.
Click to hide internal directories.