cbor library

Classes

CborAdditionalInfo
Additional Info
CborBase64
A CBOR string containing a base 64 value.
CborBase64Url
A CBOR string containing a base 64 url safe value.
CborBigFloat
A CBOR fraction (m * (2 ** e)).
CborBigInt
A CBOR big int.
CborBool
A CBOR boolean value.
CborBytes
A CBOR byte array.
CborBytesImpl
CborCodec
A CBOR encoder and decoder.
CborDateTime
A CBOR datetime.
CborDateTimeFloat
A CBOR date time encoded as seconds since epoch in a float.
CborDateTimeInt
A CBOR datetieme encoded as seconds since epoch.
CborDateTimeString
A CBOR string which encodes a datetime.
CborDecimalFraction
A CBOR fraction (m * (10 ** e)).
CborDecoder
A CBOR decoder.
CborEncodeDefiniteLengthBytes
Use this to force the CborEncoder to encode an definite length byte string.
CborEncodeDefiniteLengthList
Use this to force the CborEncoder to encode an definite length list.
CborEncodeDefiniteLengthMap
Use this to force the CborEncoder to encode an definite length dictionary.
CborEncodeDefiniteLengthString
Use this to force the CborEncoder to encode an definite length string.
CborEncodeIndefiniteLengthBytes
Use this to force the CborEncoder to encode an indefinite length byte string.
CborEncodeIndefiniteLengthList
Use this to force the CborEncoder to encode an indefinite length list.
CborEncodeIndefiniteLengthMap
Use this to force the CborEncoder to encode an indefinite length dictionary.
CborEncodeIndefiniteLengthString
Use this to force the CborEncoder to encode an indefinite length string.
CborEncoder
A CBOR encoder.
CborFloat
A CBOR float.
CborFloat128BigEndianArray
float128 big endian
CborFloat128LittleEndianArray
float128 little endian
CborFloat16BigEndianArray
float16 big endian
CborFloat16LittleEndianArray
float16 little endian
CborFloat32BigEndianArray
float32 big endian
CborFloat32LittleEndianArray
float32 little endian
CborFloat64BigEndianArray
float64 big endian
CborFloat64LittleEndianArray
float64 little endian
CborInt
A CBOR integer or big number.
CborInt16BigEndianArray
sint16 big endian
CborInt16LittleEndianArray
sint16 little endian
CborInt32BigEndianArray
sint32 big endian
CborInt32LittleEndianArray
sint32 little endian
CborInt64BigEndianArray
sint64 big endian
CborInt64LittleEndianArray
sint64 little endian
CborInt8Array
sint8
CborJsonEncoder
Encodes CBOR into JSON.
CborList
A CBOR array.
CborMajorType
Jump table for initial byte values can be found here. Maybe useful for code maintainers. Major types
CborMap
A CBOR map.
CborMime
A CBOR string containing a regular expression.
CborMultiDimensionalArray
A CBOR Multi-dimensional Array (RFC 8746).
CborNull
A CBOR null value.
CborRationalNumber
A CBOR rational number (m / n). https://peteroupc.github.io/CBOR/rational.html
CborRegex
A CBOR string containing a regular expression.
CborSimpleCodec
A simple codec for CBOR, using CborSimpleEncoder and CborSimpleDecoder.
CborSimpleDecoder
A simple decoder for CBOR.
CborSimpleEncoder
A simple encoder for CBOR.
CborSimpleValue
A CBOR simple value without any additional content.
CborSmallInt
A CBOR integer which can be represented losslessly as int.
CborString
A CBOR string encoded in UTF-8.
CborTag
Hint for the content of something.
CborTypedArray
Base class for all Typed Arrays
CborUint16BigEndianArray
uint16 big endian
CborUint16LittleEndianArray
uint16 little endian
CborUint32BigEndianArray
uint32 big endian
CborUint32LittleEndianArray
uint32 little endian
CborUint64BigEndianArray
uint64 big endian
CborUint64LittleEndianArray
uint64 little endian
CborUint8Array
uint8
CborUint8ClampedArray
uint8 clamped
CborUndefined
A CBOR undefined value.
CborUri
A CBOR string containing URI.
CborValue
A CBOR value.

Enums

CborFloatPrecision
Enumeration to allow the user to select which level of precision to use encoding a CBOR float. Defaults to 'automatic'
CborLengthType

Constants

cbor → const CborCodec
A constant instance of a CBOR codec, using default parameters.
kCborDefiniteLengthThreshold → const int

Functions

cborDecode(List<int> value) CborValue
Alias for cbor.decode.
cborEncode(CborValue value) List<int>
Alias for cbor.encode.
cborPrettyPrint(List<int> input, {int indent = CborConstants.prettyPrintIndent}) String
Pretty print a CBOR input.

Exceptions / Errors

CborCyclicError
Raised when object could not be codified due to cyclic references.
CborMalformedException
An exception raised when decoding.