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.
- Mixed-in types
- Implementers
- Available extensions
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, {CborObject<
Object?> unknownType(Object value)?}) -
Create a new CborObject from a dynamic value and an optional list of CBOR tags.
factory
Properties
Methods
-
as<
T extends CborObject< (Object?> >{String? operation}) → T -
Available on CborObject<
Object?> , provided by the ExtCborHelper extension -
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? -
hasType<
T> () → bool -
Available on CborObject<
Checks whether the value stored in the CborObject has the specified typeObject?> , provided by the ExtCborHelper extensionT. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
objectTo<
E, T extends CborObject< (Object?> >E toe(T e)) → E -
Available on CborObject<
Object?> , provided by the ExtCborHelper extension -
toCborHex(
) → 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