Aus öffentlichen Paketdaten erstellte Orientierung.
Eine Dart-Bibliothek zum Codieren und Decodieren von CBOR-Daten (Concise Binary Object Representation), kompatibel mit RFC8949. Sie ermöglicht die effiziente Serialisierung strukturierter Daten in ein kompaktes Binärformat, ideal für IoT-, Mobile- und Web-Anwendungen, bei denen Bandbreite und Leistung entscheidend sind. Das Paket unterstützt alle Standard-CBOR-Typen und integriert sich nahtlos in die Dart-Ecosystem.
Anwendungsfälle
Effiziente Datenserialisierung in IoT-Geräten
Kompakte Payload-Übertragung in mobilen Apps
Interoperabilität mit Systemen, die CBOR verwenden
Web-API-Datenaustausch
Binäre Daten in leichtgewichtigen Formaten einbetten
Hauptmerkmale
RFC8949-konform
Unterstützt alle CBOR-Datentypen
Leichte binäre Kodierung
Plattformübergreifende Kompatibilität
Einfache API zum Codieren/Dekodieren
Läuft auf allen wichtigen Plattformen
Geeignet für
Entwickler, die kompakte Datenformate benötigen
Anwendungen, die eine Hochleistungs-Serienisierung erfordern
Systeme, die über CBOR kommunizieren
Mobile und Web-Applikationen mit begrenzter Bandbreite
Hinweise
Nur auf CBOR-Format beschränkt
Keine integrierte Unterstützung für Schema-Validierung
Erfordert Verständnis der CBOR-Semantik
Nicht geeignet für menschenlesbare Daten
Original-README
Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.
This package provides an encoding/decoding package for the Concise Binary Object
Representation as documented in RFC8949.
CBOR is increasingly used as a line protocol in the IOT world where the overhead
of transmitting JSON on constrained devices can be large in packet size and
processing overheads.
Features
Streamlined encoding and decoding of CBOR, including indefinite length and
streamed decoding.
Set of types that semantically handles types, nesting, and tags.
Automatic conversion for the smallest size needed for integers.
Automatic conversion for the smallest precision needed for floating point
numbers.
Any value can be the key for a map.
Optional simple API for encoding and decoding directly to Dart objects.
Pretty-printing and conversion to JSON.
Rational numbering encoding is supported on tag 30.
Usage
Two APIs are provided, cbor.dart and simple.dart.
cbor.dart
Encodes from CborValue and decodes to CborValue.
The CborValue contains the tags for this item, and its subtypes are used to
identify the type and tags for the item. This allows one to handle information
encoded in a more lossless way.
Inheritance tree for CborValue looks something like this: