msgPackDecode

inline fun <T> msgPackDecode(bytes: ByteArray): Result<T>

Decodes a given msgpack byte array into an object using the reified type's deserializer.

Return

a Result containing the decoded object, or an exception if the decoding fails

Parameters

T

the type of the object to decode

bytes

the msgpack byte array to decode


fun <T> msgPackDecode(serializer: DeserializationStrategy<T>, bytes: ByteArray): Result<T>

Decodes a given msgpack byte array into an object using the provided deserializer.

Return

a Result containing the decoded object, or an exception if the decoding fails

Parameters

serializer

the deserializer to use for decoding the object

bytes

the msgpack byte array to decode