pkg.go.dev

This section is empty.

StructAsArray is encoding option. If this option sets true, default encoding sets to array-format.

AddExtCoder adds encoders for extension types.

func Decode(data []byte, v interface{}) error

Deprecated: Use Unmarshal, this method will be deleted.

func DecodeStructAsArray(data []byte, v interface{}) error

Deprecated: Use UnmarshalAsArray, this method will be deleted.

func DecodeStructAsMap(data []byte, v interface{}) error

Deprecated: Use UnmarshalAsMap, this method will be deleted.

Deprecated: Use Marshal, this method will be deleted.

func EncodeStructAsArray(v interface{}) ([]byte, error)

Deprecated: Use MarshalAsArray, this method will be deleted.

func EncodeStructAsMap(v interface{}) ([]byte, error)

Deprecated: Use MarshalAsMap, this method will be deleted.

Marshal returns the MessagePack-encoded byte array of v.

func MarshalAsArray(v interface{}) ([]byte, error)

EncodeStructAsArray encodes data as array format. This is the same thing that StructAsArray sets true.

func MarshalAsMap(v interface{}) ([]byte, error)

MarshalAsMap encodes data as map format. This is the same thing that StructAsArray sets false.

RemoveExtCoder removes encoders for extension types.

func SetComplexTypeCode(code int8)

SetComplexTypeCode sets def.complexTypeCode

func Unmarshal(data []byte, v interface{}) error

Unmarshal analyzes the MessagePack-encoded data and stores the result into the pointer of v.

func UnmarshalAsArray(data []byte, v interface{}) error

UnmarshalAsArray decodes data that is encoded as array format. This is the same thing that StructAsArray sets true.

func UnmarshalAsMap(data []byte, v interface{}) error

UnmarshalAsMap decodes data that is encoded as map format. This is the same thing that StructAsArray sets false.

This section is empty.

Read the original on pkg.go.dev ↗