msgPackEncode

inline fun <T> msgPackEncode(value: T): ByteArray

Encodes a given object into a msgpack byte array using the reified type's serializer.

Return

the msgpack byte array

Parameters

T

the type of the object to encode

value

the object to encode


fun <T> msgPackEncode(serializer: SerializationStrategy<T>, value: T): ByteArray

Encodes a given object into a msgpack byte array using the provided serializer.

Return

the msgpack byte array

Parameters

serializer

the serializer to use for encoding the object

value

the object to encode