Constructors for the four values cbor_decode() returns when R has no
faithful type of its own. Encoding accepts them too, to write those
values back.
Details
cbor_map()is a map whose keys are not all non-empty, unique text: COSE and CWT use small integers as keys, for example.keysandvaluesare lists of equal length, in order.cbor_tag()is a tagged item:tagis the tag number,valueits content.cbor_encode()refuses content its tag number does not allow, such as a number under tag 0.cbor_simple()is a simple value other thanfalse,true,nullandundefined: 0 to 19 or 32 to 255.cbor_bigint()is an integer outside what a double holds exactly, stored as canonical decimal text. It accepts decimal strings, or whole numbers within 2^53.
Examples
cbor_map(list(1L, 3L), list(-7L, "ES256"))
#> <cbor_map: 2 entries>
#> [[1]]
#> [1] -7
#> [[3]]
#> [1] "ES256"
cbor_tag(32, "https://example.com")
#> <cbor_tag 32>
#> [1] "https://example.com"
cbor_simple(16)
#> simple(16)
cbor_bigint("18446744073709551616")
#> <cbor_bigint[1]>
#> [1] 18446744073709551616