Unpacker.unpack

Deserializes T object and assigns to array.

This is convenient method for array deserialization. Rollback will be completely successful if you deserialize raw type((u)byte[] or string types). But, Rollback will be one element(e.g. int) if you deserialize other types(e.g. int[], intint)

No assign if the length of deserialized object is 0.

In a static array, this method checks the length. Do rollback and throw exception if length of array is different from length of deserialized object.

Parameters

array T

the reference of array to assign.

Return Value

Type: Unpacker

self, i.e. for method chaining.

Throws

UnpackException when doesn't read from buffer or precision loss occurs and MessagePackException when T type doesn't match serialized type.

Meta