c++
const CBORTree::CborMapTemplate<MyStruct> myStructTemplate({
{"key1", &MyStruct::field1},
{"key2", &MyStruct::field2},
});
CBORTree::CborValue cborValue(myData);
MyStruct myStruct;
myStructTemplate.parse(cborValue, myStruct);
c++
CBORTree::CborValue cborValue(myData);
if (cborValue.isMap()) {
for (const auto& it: cborValue.getMap()) {
std::string key = it.first.getString();
CBORTree::CborValue value = it.second;
}
}