CBOR for Qt
Clone
git submodule update --init
Include to your project
include(qcbor/qcbor.pri)
Packing
QList<int> list;
list << 1 << 2 << 3;
QByteArray array = CBOR::encode(QVariant::fromValue(list));
Unpacking:
QVariant unpacked = CBOR::decode(data);
Both CBOR::encode
and CBOR::decode
are safe to be used from multiple threads.