Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can I tag arrays opened within Maps? #90

Open
mcr opened this issue Mar 16, 2021 · 2 comments
Open

can I tag arrays opened within Maps? #90

mcr opened this issue Mar 16, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@mcr
Copy link
Contributor

mcr commented Mar 16, 2021

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
Copy link
Contributor Author

mcr commented Mar 16, 2021

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

@laurencelundblade
Copy link
Owner

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 laurencelundblade added the enhancement New feature or request label Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants