Documentation ¶
Index ¶
- func Marshal(v interface{}) ([]byte, error)
- func MarshalAsArray(v interface{}) ([]byte, error)
- func MarshalAsMap(v interface{}) ([]byte, error)
- func SetComplexTypeCode(code int8)
- func SetResolver(encAsMap, encAsArray EncResolver, decAsMap, decAsArray DecResolver)
- func SetStructAsArray(on bool)
- func StructAsArray() bool
- func Unmarshal(data []byte, v interface{}) error
- func UnmarshalAsArray(data []byte, v interface{}) error
- func UnmarshalAsMap(data []byte, v interface{}) error
- type DecResolver
- type EncResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalAsArray ¶
MarshalAsArray encodes data as array format. This is the same thing that StructAsArray sets true.
func MarshalAsMap ¶
MarshalAsMap encodes data as map format. This is the same thing that StructAsArray sets false.
func SetComplexTypeCode ¶
func SetComplexTypeCode(code int8)
SetComplexTypeCode sets def.complexTypeCode in github.com/shamaton/msgpack
func SetResolver ¶
func SetResolver(encAsMap, encAsArray EncResolver, decAsMap, decAsArray DecResolver)
SetResolver sets generated resolvers to bridge variables.
func SetStructAsArray ¶
func SetStructAsArray(on bool)
SetStructAsArray sets default encoding option. If this option sets true, default encoding sets to array-format.
func StructAsArray ¶
func StructAsArray() bool
StructAsArray gets default encoding option. If this option sets true, default encoding sets to array-format.
func Unmarshal ¶
Unmarshal analyzes the MessagePack-encoded data and stores the result into the pointer of v.
func UnmarshalAsArray ¶
UnmarshalAsArray decodes data that is encoded as array format. This is the same thing that StructAsArray sets true.
func UnmarshalAsMap ¶
UnmarshalAsMap decodes data that is encoded as map format. This is the same thing that StructAsArray sets false.
Types ¶
type DecResolver ¶
DecResolver is a definition to resolve de-serialization.
type EncResolver ¶
EncResolver is a definition to resolve serialization.