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

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T
An abstract property representing the dynamic value contained in the CBOR object.
final
variables List
no setteroverride

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<Object?>, provided by the ExtCborHelper extension

Checks whether the value stored in the CborObject has the specified type T.
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