सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
RFC8949 के अनुरूप CBOR (संक्षिप्त बाइनरी ऑब्जेक्ट रिप्रेजेंटेशन) डेटा को संकोड़न और डीकोड करने के लिए एक Dart पुस्तकालय। यह संरचित डेटा को संक्षिप्त बाइनरी फॉरमेट में प्रभावी ढंग से अनुक्रमित करने की अनुमति देता है, जो बैंडविड्थ और प्रदर्शन के महत्वपूर्ण आईओटी, मोबाइल और वेब एप्लिकेशन के लिए उपयुक्त है। पैकेज सभी मानक CBOR प्रकार का समर्थन करता है और Dart के इकोसिस्टम के साथ बिना किसी दिक्कत के एकीकृत होता है।
उपयोग
आईओटी उपकरणों में कुशल डेटा सीरियलाइजेशन
मोबाइल ऐप में संक्षिप्त पेलोड संचरण
CBOR का उपयोग करने वाले सिस्टम के साथ अंतरक्रिया
वेब एपीआई डेटा आदान-प्रदान
हल्के रूप में बाइनरी डेटा को एम्बेड करना
मुख्य विशेषताएँ
RFC8949 के अनुरूप
सभी CBOR डेटा प्रकारों का समर्थन करता है
हल्का बाइनरी कोडिंग
क्रॉस-प्लेटफॉर्म संगतता
कोडिंग/डीकोडिंग के लिए सरल API
सभी प्रमुख प्लेटफॉर्म पर काम करता है
इनके लिए उपयुक्त
संक्षिप्त डेटा प्रारूप की आवश्यकता वाले विकासकर्ता
उच्च प्रदर्शन अनुक्रमण की आवश्यकता वाले एप्लिकेशन
CBOR के माध्यम से संचार कर रहे प्रणालियाँ
सीमित बैंडविड्थ वाले मोबाइल और वेब ऐप्स
विचार योग्य बातें
केवल CBOR प्रारूप के लिए सीमित
स्कीमा वैधता के लिए निर्मित समर्थन नहीं है
CBOR अर्थ की समझ की आवश्यकता है
मानव-पठनीय डेटा के लिए उपयुक्त नहीं
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
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: