Unpacker class

Streaming API for unpacking (deserializing) data from msgpack binary format.

unpackXXX methods returns value if it exist, or null. Throws FormatException if value is not an requested type, but in that case throwing exception not corrupt internal state, so other unpackXXX methods can be called after that.

Constructors

Unpacker(Uint8List _list)
Manipulates with provided Uint8List to sequentially unpack values. Use Unpaker.fromList() to unpack raw List<int> bytes.
Unpacker.fromList(List<int> l)
Convenient

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
unpackBinary() List<int>
Unpack value if packed value is binary or null.
unpackBool() bool?
Unpack value if it exist. Otherwise returns null.
unpackDouble() double?
Unpack value if it exist. Otherwise returns null.
unpackInt() int?
Unpack value if it exist. Otherwise returns null.
unpackList() List<Object?>
Automatically unpacks bytes to List where items has corresponding data types.
unpackListLength() int
Unpack List.length if packed value is an List or null.
unpackMap() Map<Object?, Object?>
Automatically unpacks bytes to Map where key and values has corresponding data types.
unpackMapLength() int
Unpack Map.length if packed value is an Map or null.
unpackString() String?
Unpack value if it exist. Otherwise returns null.

Operators

operator ==(Object other) bool
The equality operator.
inherited