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

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

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

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