ValueTags

Specifies that a property shall be tagged and the tag is serialized as CBOR major type 6: optional semantic tagging of other major types.

Example usage:

@Serializable
data class Data(
@ValueTags(1337uL)
@ByteString
val a: ByteArray, // CBOR major type 6 1337(major type 2: a byte string).

@ValueTags(1234567uL)
val b: ByteArray // CBOR major type 6 1234567(major type 4: an array of data items).
)

See RFC 8949 3.4. Tagging of Items.

Properties

Link copied to clipboard