QCBOR icon indicating copy to clipboard operation
QCBOR copied to clipboard

can I tag arrays opened within Maps?

Open mcr opened this issue 4 years ago • 2 comments

if I do: QCBOREncode_OpenArrayInMapN(qec, keyint);

can I then call QCBOREncode_AddTag(qec, MyTag);

to insert a tag before the array is started?

mcr avatar Mar 16 '21 02:03 mcr

an experiment says no, so I have to open code this.

mcr avatar Mar 16 '21 02:03 mcr

Yeah, it won't work. The tag will be applied to the integer map label. So you have to do this: QCBOREncode_AddInt64(qec, keyint); QCBOREncode_AddTag(qec, MyTag); QCBOREncode_OpenArray(qec);

laurencelundblade avatar Mar 17 '21 03:03 laurencelundblade