erwah / ietf

CBOR Web Token
0 stars 2 forks source link

Update text to talk about desired data instead of major types #42

Closed erdtman closed 7 years ago

erdtman commented 7 years ago

E2: The text is weirdly obsessed about CBOR serialization details. It is really making statements about the data model level, but dives into serialization immediately instead. This reads like a JSON spec would read that would repeatedly talk about "double-quote-delimited strings, which backslash escaping" each time a string is needed. That's not the way JSON is used, and we shouldn't start doing this for CBOR either. Just about every case that talks about "major type" really should talk about the data that is desired.

selfissued commented 7 years ago

I agree that talking about the "major type" is weird. I particularly noticed this when doing the editing for the last version, in which some types we use, like floating point types, require both a major and minor type number to specify. We should change these uses to instead talk about the data types (and possibly on first use of those data types, put the CBOR major type number, and where applicable, the minor type number, in parenthesis, as an aid to implementers).