CBOR Tag
CBOR tags use a tag number to mark the semantic type of data (e.g., date, URL, bignum), extending CBOR's type system.
Purpose
To annotate standard and custom semantic types in CBOR so decoders interpret data according to its type.
Mechanism
Major type 6 denotes a tag: the tag number (varint) is followed by the tagged data. Standard tags: 0=RFC 3339 date string, 1=epoch timestamp, 2/3=bignum, 4/5=decimal fraction, 30=rational, 35=regular expression, 36=base64.
Use cases
- IoT semantic data
- WebAuthn extension types
- Rich CBOR types