anima-wg / constrained-voucher

This is a repo for the IETF Internet Draft about constrained vouchers in CBOR
2 stars 4 forks source link

Align elision syntax with draft-ietf-cbor-edn-literal #276

Closed cabo closed 8 months ago

cabo commented 10 months ago

Why four dots?

cabo commented 10 months ago

Please also set type="cbor-diag" in the CBOR diagnostic notation examples.

{"foo": "bar"}
EskoDijk commented 10 months ago

@cabo I see draft-ietf-cbor-edn-literals-04 uses three dots (...) within a comment, e.g. /.../ In our present draft there was a need to shorten binary strings, short example below:

{
   12: h'30593013....D29A54', / SID=2513, proximity-registrar-pubk /
   13: "JADA123456789"        / SID=2514, serial-number            /
}

Would the below be better? This parses as valid CBOR diagnostic notation, while the /.../ shows that something is elided.

{
   12: h'30593013/.../D29A54', / SID=2513, proximity-registrar-pubk /
   13: "JADA123456789"        / SID=2514, serial-number            /
}
cabo commented 10 months ago

The elision syntax isn't actually in that draft yet... (a new branch is being set up). But there is an old slide set, https://datatracker.ietf.org/meeting/interim-2022-cbor-03/materials/slides-interim-2022-cbor-03-sessa-elision-00 I'll get back to this issue when I can point out what exactly needs to be done... Just wanted to record it now.

(Doing the elision in a comment also works, but then it looks like these bytes aren't actually there!)

EskoDijk commented 10 months ago

@cabo Thanks, that's enlightening. So it then would become

{
   12: h'30593013' ... 'D29A54', / SID=2513, proximity-registrar-pubk /
   13: "JADA123456789"        / SID=2514, serial-number            /
}
EskoDijk commented 8 months ago

The ellipsis notation is now defined in draft-ietf-cbor-edn-literals-06: this is referenced and used. See linked PR: also "cose-diag" code type used for the XML tags.