Composes a dCBOR map from a slice of string slices, and returns a CBOR object representing the map.
The length of the slice must be even, as each key must have a corresponding value.
Each string slice is parsed as a dCBOR item.
Array of strings representing key-value pairs in alternating order
A CBOR map containing all parsed key-value pairs
const result = composeDcborMap(["1", "2", "3", "4"]);if (result.ok) { console.log(result.value.toDiagnostic()); // "{1: 2, 3: 4}"} Copy
const result = composeDcborMap(["1", "2", "3", "4"]);if (result.ok) { console.log(result.value.toDiagnostic()); // "{1: 2, 3: 4}"}
Composes a dCBOR map from a slice of string slices, and returns a CBOR object representing the map.
The length of the slice must be even, as each key must have a corresponding value.
Each string slice is parsed as a dCBOR item.