Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces basic support for CBOR tags.
Basic means that no semantic checks are performed yet, so you freely use reserved tags (e.g. serialize a cornucopia of fruit and other produce using tags reserved for dates, URIs, MIME messages, negative bignums and so forth) and no error will be thrown.
writeKeyTags
writeValueTags
verifyKeyTags
verifyValueTags
This is the first PR in a series of planned enhancements, but we still consider it valuable on its own (as it also affects #1560).
In the long run, we plan to support semantically correct serialization for all reserved CBOR tags. This includes separate contributions to koltinx.datetime and the native support for self-describing CBOR. The latter of which is planned to enable the deserialization of CBOR structures, while also enabling access to the original underlying raw byte-string. This is a crucial features for conveniently working with (i.e. verifying) signed data. (Which, in turn, is a requirement for a 100% pure Kotlin multiplatform COSE implementation.)
Hence, we want to use this opportunity to also collect early feedback from those who are more familiar with kotlinx.serialization than we are.
(ofc, this should be squashed prior to merging/rebasing)