CborObject<T extends Object?> class
abstract
An abstract class representing a CBOR (Concise Binary Object Representation) object. CBOR objects can hold various data types and optional tags, providing a flexible way to represent structured data in a compact binary format.
Constructors
- CborObject(T value)
-
const
-
CborObject.fromCbor(List<
int> cborBytes) -
Create a new CborObject by decoding the given CBOR-encoded bytes
factory
- CborObject.fromCborHex(String cborHex)
-
Create a new CborObject by decoding the given CBOR-encoded hex
factory
- CborObject.fromDynamic(dynamic value)
-
Create a new CborObject from a dynamic value and an optional list of CBOR tags.
factory
Properties
Methods
-
cast<
E extends CborObject< (Object?> >) → E -
encode(
) → List< int> -
Encode the object's value to its CBOR representation and return it as a
List<int>. -
getValue(
) → Object? -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toCborHex(
) → String - Convert the object's CBOR representation to a hexadecimal string.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
deserialize<
T extends CborObject< (Object?> >List< int> bytes) → T