-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add record function tag definition #11
Conversation
draft-ietf-cbor-packed.md
Outdated
with equal position in the provided arrays into pairs that constitute the resulting map. | ||
|
||
If the matching value item for a given key item is either >undefined< (simple value 23) | ||
or does not exist (because the value item array is shorter than the key item array), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, maybe there is no resulting pair if the value doesn't exist?
Maybe we can factor absence and "undefined" together, as in "in the value array, items of value "undefined" are treated as absent"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
The value item array may be shorter than the key item array, in which case one or more value items towards the end are absent.
Additionally, value items that areundefined
(0xf7) are treated as absent.
Key items whose matching value items are absent are not included in the resulting map.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put in a slightly edited version of this.
We don't say yet what happpens if the value item array is longer than the key item array.
Should this be a "MUST NOT"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put in a slightly edited version of this.
Reads good to me, thanks!
We don't say yet what happens if the value item array is longer than the key item array.
Should this be a "MUST NOT"?
Yes, I would say so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I pushed this MUST NOT directly to main, as the merge is now confused...
0b4dbfa
Sorry, messed up the merge. |
Closing this branch -- the actual state is in function-tag-record-fixed. |
As discussed on the mailing list and the last interim.
I've also added example usage of the record function as an alternative for the first example. The second example would probably also benefit from it, but it might also make the example even harder to understand?