Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CBOR Feature Drop: COSE #2412

Merged
merged 98 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
b1182ec
CBOR basic value tagging
JesusMcCloud Jul 5, 2023
47d6233
CBOR: handle tagged keys
JesusMcCloud Jul 5, 2023
87bcda3
CBOR: make verifying and writing tags optional
JesusMcCloud Jul 5, 2023
d3eac6b
CBOR: fix decoding value tags, add tests
JesusMcCloud Jul 5, 2023
2788ec2
CBOR: refactor Tagged → ValueTags
JesusMcCloud Jul 5, 2023
c620fdb
CBOR: Fixes (docs, whitespace, names, superflous params)
JesusMcCloud Jul 10, 2023
0d1b31b
CBOR: serialize cbor to tree
JesusMcCloud Jul 18, 2023
4f82ec8
CBOR: tree fixes
JesusMcCloud Jul 19, 2023
1356666
CBOR: frankensteined data tree
JesusMcCloud Jul 19, 2023
76afa35
CBOR: fix direct encoding of primitives
JesusMcCloud Jul 19, 2023
ce9eefd
CBOR: write definite lengths
JesusMcCloud Jul 19, 2023
8b328f4
CBOR: experiment with pruning null properties
JesusMcCloud Jul 19, 2023
ad97cbb
CBOR: Catch errors on finding annotations
nodh Jul 25, 2023
ef1f77d
CBOR: Implement labels to use as map keys
nodh Jul 13, 2023
83824b6
WIP: Ignore failing tests
nodh Jul 25, 2023
eb73d7d
CBOR: Add option to write serial labels over names
nodh Jul 13, 2023
53c8c42
CBOR: Add annotation @CborArray to encode classes as arrays
nodh Jul 13, 2023
6a9bc52
CBOR: Add convenience class for wrapping byte strings during serializ…
nodh Jul 13, 2023
03b7771
CBOR: Test combination of serial label with tags
nodh Jul 17, 2023
86c7f82
CBOR: Add option to always use compact byte string encoding
nodh Jul 19, 2023
82fb4be
CBOR: Fix potential issue with custom serializers
nodh Jul 25, 2023
af0b7a3
CBOR: Encode null complex object as empty map
nodh Jul 26, 2023
6572245
CBOR: remove recursion and null pruning
JesusMcCloud Aug 17, 2023
19eb85e
CBOR: remove bogus `explicitNulls`
JesusMcCloud Aug 17, 2023
9c305f4
CBOR: streamline an simplify encoding
JesusMcCloud Aug 17, 2023
72b61de
CBOR: minor cleanups
JesusMcCloud Aug 17, 2023
972657d
CBOR: fix polymorphism
JesusMcCloud Aug 18, 2023
93ffa7a
CBOR: document new features
JesusMcCloud Aug 18, 2023
6bbffef
CBOR: run knit+ fix docs
JesusMcCloud Aug 18, 2023
7625683
CBOR: update API dumps
JesusMcCloud Aug 18, 2023
addae47
CBOR: Provide serializer for ByteStringWrapper
nodh Sep 25, 2023
13014d8
CBOR: Rename "SerialLabel" to "CborLabel"
nodh Sep 25, 2023
a389636
CBOR: Add documentation to CborLabel and CborArray
nodh Sep 25, 2023
07463a1
CBOR: Suppress warning about desugared API on Android
nodh Sep 25, 2023
c1067f4
CBOR: remove Encoder class
JesusMcCloud Sep 25, 2023
9418e2c
CBOR: don't preallocate for preamble
JesusMcCloud Jan 11, 2024
42e9fe6
CBOR: don't preallocate for data
JesusMcCloud Jan 11, 2024
290666a
CBOR: minor adjustments (missing docs, formatting, …)
JesusMcCloud Jan 11, 2024
992a11a
CBOR: simplify encoding and comment data structures
JesusMcCloud Jan 11, 2024
e6ead57
CBOR: minor cleanups
JesusMcCloud Jan 11, 2024
3fb8687
run knit
JesusMcCloud Jan 12, 2024
71896a4
update API dump
JesusMcCloud Jan 12, 2024
07ca549
CBOR: adapt CborArray annotation to avoid empty ULong varags
JesusMcCloud Jun 20, 2024
8cb3d99
CBOR: split up encoder and decoder
JesusMcCloud Jun 20, 2024
ea64d54
CBOR: Partial performance optimization
JesusMcCloud Jun 20, 2024
674426d
CBOR: simplify encoding
JesusMcCloud Jun 20, 2024
7b745f5
CBOR: split up encoders
JesusMcCloud Jun 20, 2024
b86f5ca
CBOR: peak performance
JesusMcCloud Jun 20, 2024
d7397b2
CBOR: Update API Dump
JesusMcCloud Jun 20, 2024
897ff72
CBOR: fix EncodingUtils
JesusMcCloud Jul 1, 2024
8389089
CBOR: Clarify CborLabel docs
JesusMcCloud Jul 1, 2024
a45daf7
CBOR: remove unused functions
JesusMcCloud Jul 1, 2024
00185f5
COSE: Remove ByteStringWrapper
JesusMcCloud Jul 1, 2024
dc07e3c
CBOR: document CborArray Tags annotation
JesusMcCloud Jul 1, 2024
49b3ea2
CBOR: document predefined tags
JesusMcCloud Jul 1, 2024
aeb83cf
CBOR: revamp tagging
JesusMcCloud Jul 2, 2024
682f363
CBOR: pull up encoder method
JesusMcCloud Jul 2, 2024
3d8768c
CBOR: clode DefiniteLengthCborWriter
JesusMcCloud Jul 2, 2024
f4b43e7
CBOR: fix default instance writing and verifying tags
JesusMcCloud Jul 2, 2024
13e2eb0
CBOR: fix: uncomment tag test
JesusMcCloud Jul 2, 2024
2439e5e
CBOR: get labels only when preferred over serial names
JesusMcCloud Jul 2, 2024
759ffce
CBOR: run knit and apiDump
JesusMcCloud Jul 2, 2024
13e3d5a
CBOR: fix readme
JesusMcCloud Jul 2, 2024
82f326f
CBOR: split encoder and decoder interfaces
JesusMcCloud Jul 3, 2024
5697e3f
CBOR: Fix serialName encoding for absent labels
JesusMcCloud Jul 8, 2024
62b80b5
CBOR: expose configuration flags as public properties
JesusMcCloud Jul 8, 2024
176848c
CBOR: fix ExperimentalSerializationApi annotations
JesusMcCloud Jul 8, 2024
c55ab97
CBOR: fix missing API Docs
JesusMcCloud Jul 8, 2024
7c25ffe
CBOR: remove unused helper function
JesusMcCloud Jul 8, 2024
b0cba73
CBOR: update apidump
JesusMcCloud Jul 8, 2024
ac17821
CBOR: try fix animalsniffer error
JesusMcCloud Jul 8, 2024
a1a7dad
CBOR: remove bogur runCatching
JesusMcCloud Jul 8, 2024
3724fea
CBOR: SuppressAnimalSniffer
JesusMcCloud Jul 8, 2024
3cec347
CBOR fix code comment
JesusMcCloud Jul 11, 2024
1b8fba7
CBOR: Fix Docs
JesusMcCloud Jul 12, 2024
eb6ac40
CBOR: SuppressAnimalSniffer
JesusMcCloud Jul 11, 2024
2fa4f88
CBOR: Add Encoder and Decoder superinterfaces to CborEncoder and Cbor…
JesusMcCloud Jul 11, 2024
d99999c
CBOR: rename configuration flags
JesusMcCloud Jul 11, 2024
e483c7f
CBOR: Refactor Tagging instance -> CoseCompliant
JesusMcCloud Jul 11, 2024
00bcb68
CBOR: introduce CborConfiguration+ minor docs fixes
JesusMcCloud Jul 11, 2024
abf9a55
CBOR: move convenience methods used for testing to test sources
JesusMcCloud Jul 11, 2024
1c1527c
CBOR: Fix index OOB error when decoding tags
JesusMcCloud Jul 11, 2024
434ac38
CBOR fix and test against specific error messages
JesusMcCloud Jul 11, 2024
8f1e33f
CBOR: fix error message grammar
JesusMcCloud Jul 11, 2024
b0d8885
CBOR: move convenience method used for testing to test sources
JesusMcCloud Jul 11, 2024
86fc01b
CBOR: clarify and test object tags behaviour
JesusMcCloud Jul 11, 2024
707b9b7
CBOR: Fix docs
JesusMcCloud Jul 12, 2024
069fb77
CBOR: Fix Docs
JesusMcCloud Jul 12, 2024
69ae08f
CBOR: fix builder switch names and polisch docs
JesusMcCloud Jul 12, 2024
29b6605
CBOR: Update API dump and run knit
JesusMcCloud Jul 12, 2024
2294cc7
CBOR: refactor CborImpl C'tor
JesusMcCloud Jul 15, 2024
507ccd1
CBOR: remove superfluouos config switch for CborArrayTest
JesusMcCloud Jul 15, 2024
15bbc3f
CBOR: mv CborDefLenTest -> CborDefiniteLengthTest
JesusMcCloud Jul 15, 2024
46227cf
CBOR: Refactor Tests
JesusMcCloud Jul 15, 2024
167877b
CBOR: polish CborConfiguration
JesusMcCloud Jul 15, 2024
7ec8e02
CBOR: cleanup CborDecoder and CborParser
JesusMcCloud Jul 17, 2024
a272a2d
CBOR: Fix documentation
JesusMcCloud Jul 19, 2024
f12a5bf
CBOR: cleanup AnimalSniffer
JesusMcCloud Jul 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ dependencies {
implementation(libs.jackson.module.kotlin)
implementation(libs.okio)
implementation(project(":kotlinx-serialization-core"))
implementation(project(":kotlinx-serialization-cbor"))
implementation(project(":kotlinx-serialization-json"))
implementation(project(":kotlinx-serialization-json-okio"))
implementation(project(":kotlinx-serialization-protobuf"))
Expand Down
62 changes: 62 additions & 0 deletions benchmark/src/jmh/kotlin/kotlinx/benchmarks/cbor/CborBaseLine.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* Copyright 2017-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

package kotlinx.benchmarks.cbor

import kotlinx.serialization.Serializable
import kotlinx.serialization.cbor.*
import org.openjdk.jmh.annotations.*
import java.util.concurrent.*

@Serializable
data class KTestAllTypes(
val i32: Int,
val i64: Long,
val f: Float,
val d: Double,
val s: String,
val b: Boolean = false,
)

@Serializable
data class KTestOuterMessage(
val a: Int,
val b: Double,
val inner: KTestAllTypes,
val s: String,
val ss: List<String>
)

@Warmup(iterations = 5, time = 1)
@Measurement(iterations = 10, time = 1)
@BenchmarkMode(Mode.Throughput)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@State(Scope.Benchmark)
@Fork(1)
open class CborBaseline {
val baseMessage = KTestOuterMessage(
42,
256123123412.0,
s = "string",
ss = listOf("a", "b", "c"),
inner = KTestAllTypes(-123124512, 36253671257312, Float.MIN_VALUE, -23e15, "foobarbaz")
)

val cbor = Cbor {
encodeDefaults = true
encodeKeyTags = false
encodeValueTags = false
useDefiniteLengthEncoding = false
preferCborLabelsOverNames = false
}

val baseBytes = cbor.encodeToByteArray(KTestOuterMessage.serializer(), baseMessage)

@Benchmark
fun toBytes() = cbor.encodeToByteArray(KTestOuterMessage.serializer(), baseMessage)

@Benchmark
fun fromBytes() = cbor.decodeFromByteArray(KTestOuterMessage.serializer(), baseBytes)

}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ afterEvaluate { // Can be applied only when the project is evaluated
"kotlinx-serialization-core" -> "kotlinx.serialization.internal.SuppressAnimalSniffer"
"kotlinx-serialization-hocon" -> "kotlinx.serialization.hocon.internal.SuppressAnimalSniffer"
"kotlinx-serialization-protobuf" -> "kotlinx.serialization.protobuf.internal.SuppressAnimalSniffer"
"kotlinx-serialization-cbor" -> "kotlinx.serialization.cbor.internal.SuppressAnimalSniffer"
else -> "kotlinx.serialization.json.internal.SuppressAnimalSniffer"
}

Expand Down
90 changes: 90 additions & 0 deletions docs/formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ stable, these are currently experimental features of Kotlin Serialization.
* [CBOR (experimental)](#cbor-experimental)
* [Ignoring unknown keys](#ignoring-unknown-keys)
* [Byte arrays and CBOR data types](#byte-arrays-and-cbor-data-types)
* [Definite vs. Indefinite Length Encoding](#definite-vs-indefinite-length-encoding)
* [Tags and Labels](#tags-and-labels)
* [Arrays](#arrays)
* [Custom CBOR-specific Serializers](#custom-cbor-specific-serializers)
* [ProtoBuf (experimental)](#protobuf-experimental)
* [Field numbers](#field-numbers)
* [Integer types](#integer-types)
Expand Down Expand Up @@ -164,6 +168,8 @@ Per the [RFC 7049 Major Types] section, CBOR supports the following data types:

By default, Kotlin `ByteArray` instances are encoded as **major type 4**.
When **major type 2** is desired, then the [`@ByteString`][ByteString] annotation can be used.
Moreover, the `alwaysUseByteString` configuration switch allows for globally preferring **major type 2** without needing
to annotate every `ByteArray` in a class hierarchy.

<!--- INCLUDE
import kotlinx.serialization.*
Expand Down Expand Up @@ -221,6 +227,90 @@ BF # map(*)
FF # primitive(*)
```

### Definite vs. Indefinite Length Encoding
CBOR supports two encodings for maps and arrays: definite and indefinite length encoding. kotlinx.serialization defaults
to the latter, which means that a map's or array's number of elements is not encoded, but instead a terminating byte is
appended after the last element.
Definite length encoding, on the other hand, omits this terminating byte, but instead prepends number of elements
to the contents of a map or array. The `useDefiniteLengthEncoding` configuration switch allows for toggling between the
two modes of encoding.


### Tags and Labels

CBOR allows for optionally defining *tags* for properties and their values. These tags are encoded into the resulting
byte string to transport additional information
(see [RFC 8949 Tagging of Items](https://datatracker.ietf.org/doc/html/rfc8949#name-tagging-of-items) for more info).
The [`@KeyTags`](Tags.kt) and [`@ValueTags`](Tags.kt) annotations can be used to define such tags while
writing and verifying such tags can be toggled using the `encodeKeyTags`, `encodeValueTags`, `verifyKeyTags`, and
`verifyValueTags` configuration switches respectively.
In addition, it is possible to directly declare classes to always be tagged.
This then applies to all instances of such a tagged class, regardless of whether they are used as values in a list
or when they are used as a property in another class.
Forcing objects to always be tagged in such a manner is accomplished by the [`@ObjectTags`](Tags.kt) annotation,
which works just as `ValueTags`, but for class definitions.
When serializing, `ObjectTags` will always be encoded directly before to the data of the tagged object, i.e. a
value-tagged property of an object-tagged type will have the value tags preceding the object tags.
Writing and verifying object tags can be toggled using the `encodeObjectTags` and `verifyObjectTags` configuration
switches. Note that verifying only value tags can result in some data with superfluous tags to still deserialize
successfully, since in this case - by definition - only a partial validation of tags happens.
Well-known tags are specified in [`CborTag`](Tags.kt).

In addition, CBOR supports keys of all types which work just as `SerialName`s.
COSE restricts this again to strings and numbers and calls these restricted map keys *labels*. String labels can be
assigned by using `@SerialName`, while number labels can be assigned using the [`@CborLabel`](CborLabel.kt) annotation.
The `preferCborLabelsOverNames` configuration switch can be used to prefer number labels over SerialNames in case both
are present for a property. This duality allows for compact representation of a type when serialized to CBOR, while
keeping expressive diagnostic names when serializing to JSON.

A predefined Cbor instance (in addition to the default [`Cbor.Default`](Cbor.kt) one) is available, adhering to COSE
encoding requirements as [`Cbor.CoseCompliant`](Cbor.kt). This instance uses definite length encoding,
encodes and verifies all tags and prefers labels to serial names.

### Arrays

Classes may be serialized as a CBOR Array (major type 4) instead of a CBOR Map (major type 5).

Example usage:

```
@Serializable
data class DataClass(
val alg: Int,
val kid: String?
)

Cbor.encodeToByteArray(DataClass(alg = -7, kid = null))
```

will normally produce a Cbor map: bytes `0xa263616c6726636b6964f6`, or in diagnostic notation:

```
A2 # map(2)
63 # text(3)
616C67 # "alg"
26 # negative(6)
63 # text(3)
6B6964 # "kid"
F6 # primitive(22)
```

When annotated with `@CborArray`, serialization of the same object will produce a Cbor array: bytes `0x8226F6`, or in diagnostic notation:

```
82 # array(2)
26 # negative(6)
F6 # primitive(22)
```
This may be used to encode COSE structures, see [RFC 9052 2. Basic COSE Structure](https://www.rfc-editor.org/rfc/rfc9052#section-2).


### Custom CBOR-specific Serializers
Cbor encoders and decoders implement the interfaces [CborEncoder](CborEncoder.kt) and [CborDecoder](CborDecoder.kt), respectively.
These interfaces contain a single property, `cbor`, exposing the current CBOR serialization configuration.
This enables custom cbor-specific serializers to reuse the current `Cbor` instance to produce embedded byte arrays or
react to configuration settings such as `preferCborLabelsOverNames` or `useDefiniteLengthEncoding`, for example.

## ProtoBuf (experimental)

[Protocol Buffers](https://developers.google.com/protocol-buffers) is a language-neutral binary format that normally
Expand Down
4 changes: 4 additions & 0 deletions docs/serialization-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ Once the project is set up, we can start serializing some classes.
* <a name='cbor-experimental'></a>[CBOR (experimental)](formats.md#cbor-experimental)
* <a name='ignoring-unknown-keys'></a>[Ignoring unknown keys](formats.md#ignoring-unknown-keys)
* <a name='byte-arrays-and-cbor-data-types'></a>[Byte arrays and CBOR data types](formats.md#byte-arrays-and-cbor-data-types)
* <a name='definite-vs-indefinite-length-encoding'></a>[Definite vs. Indefinite Length Encoding](formats.md#definite-vs-indefinite-length-encoding)
* <a name='tags-and-labels'></a>[Tags and Labels](formats.md#tags-and-labels)
* <a name='arrays'></a>[Arrays](formats.md#arrays)
* <a name='custom-cbor-specific-serializers'></a>[Custom CBOR-specific Serializers](formats.md#custom-cbor-specific-serializers)
* <a name='protobuf-experimental'></a>[ProtoBuf (experimental)](formats.md#protobuf-experimental)
* <a name='field-numbers'></a>[Field numbers](formats.md#field-numbers)
* <a name='integer-types'></a>[Integer types](formats.md#integer-types)
Expand Down
120 changes: 119 additions & 1 deletion formats/cbor/api/kotlinx-serialization-cbor.api
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,144 @@ public synthetic class kotlinx/serialization/cbor/ByteString$Impl : kotlinx/seri

public abstract class kotlinx/serialization/cbor/Cbor : kotlinx/serialization/BinaryFormat {
public static final field Default Lkotlinx/serialization/cbor/Cbor$Default;
public synthetic fun <init> (ZZLkotlinx/serialization/modules/SerializersModule;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Lkotlinx/serialization/cbor/CborConfiguration;Lkotlinx/serialization/modules/SerializersModule;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun decodeFromByteArray (Lkotlinx/serialization/DeserializationStrategy;[B)Ljava/lang/Object;
public fun encodeToByteArray (Lkotlinx/serialization/SerializationStrategy;Ljava/lang/Object;)[B
public final fun getConfiguration ()Lkotlinx/serialization/cbor/CborConfiguration;
public fun getSerializersModule ()Lkotlinx/serialization/modules/SerializersModule;
}

public final class kotlinx/serialization/cbor/Cbor$Default : kotlinx/serialization/cbor/Cbor {
public final fun getCoseCompliant ()Lkotlinx/serialization/cbor/Cbor;
}

public abstract interface annotation class kotlinx/serialization/cbor/CborArray : java/lang/annotation/Annotation {
}

public synthetic class kotlinx/serialization/cbor/CborArray$Impl : kotlinx/serialization/cbor/CborArray {
public fun <init> ()V
}

public final class kotlinx/serialization/cbor/CborBuilder {
public final fun getAlwaysUseByteString ()Z
public final fun getEncodeDefaults ()Z
public final fun getEncodeKeyTags ()Z
public final fun getEncodeObjectTags ()Z
public final fun getEncodeValueTags ()Z
public final fun getIgnoreUnknownKeys ()Z
public final fun getPreferCborLabelsOverNames ()Z
public final fun getSerializersModule ()Lkotlinx/serialization/modules/SerializersModule;
public final fun getUseDefiniteLengthEncoding ()Z
public final fun getVerifyKeyTags ()Z
public final fun getVerifyObjectTags ()Z
public final fun getVerifyValueTags ()Z
public final fun setAlwaysUseByteString (Z)V
public final fun setEncodeDefaults (Z)V
public final fun setEncodeKeyTags (Z)V
public final fun setEncodeObjectTags (Z)V
public final fun setEncodeValueTags (Z)V
public final fun setIgnoreUnknownKeys (Z)V
public final fun setPreferCborLabelsOverNames (Z)V
public final fun setSerializersModule (Lkotlinx/serialization/modules/SerializersModule;)V
public final fun setUseDefiniteLengthEncoding (Z)V
public final fun setVerifyKeyTags (Z)V
public final fun setVerifyObjectTags (Z)V
public final fun setVerifyValueTags (Z)V
}

public final class kotlinx/serialization/cbor/CborConfiguration {
public final fun getAlwaysUseByteString ()Z
public final fun getEncodeDefaults ()Z
public final fun getEncodeKeyTags ()Z
public final fun getEncodeObjectTags ()Z
public final fun getEncodeValueTags ()Z
public final fun getIgnoreUnknownKeys ()Z
public final fun getPreferCborLabelsOverNames ()Z
public final fun getUseDefiniteLengthEncoding ()Z
public final fun getVerifyKeyTags ()Z
public final fun getVerifyObjectTags ()Z
public final fun getVerifyValueTags ()Z
public fun toString ()Ljava/lang/String;
}

public abstract interface class kotlinx/serialization/cbor/CborDecoder : kotlinx/serialization/encoding/Decoder {
public abstract fun getCbor ()Lkotlinx/serialization/cbor/Cbor;
}

public final class kotlinx/serialization/cbor/CborDecoder$DefaultImpls {
public static fun decodeNullableSerializableValue (Lkotlinx/serialization/cbor/CborDecoder;Lkotlinx/serialization/DeserializationStrategy;)Ljava/lang/Object;
public static fun decodeSerializableValue (Lkotlinx/serialization/cbor/CborDecoder;Lkotlinx/serialization/DeserializationStrategy;)Ljava/lang/Object;
}

public abstract interface class kotlinx/serialization/cbor/CborEncoder : kotlinx/serialization/encoding/Encoder {
public abstract fun getCbor ()Lkotlinx/serialization/cbor/Cbor;
}

public final class kotlinx/serialization/cbor/CborEncoder$DefaultImpls {
public static fun beginCollection (Lkotlinx/serialization/cbor/CborEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;I)Lkotlinx/serialization/encoding/CompositeEncoder;
public static fun encodeNotNullMark (Lkotlinx/serialization/cbor/CborEncoder;)V
public static fun encodeNullableSerializableValue (Lkotlinx/serialization/cbor/CborEncoder;Lkotlinx/serialization/SerializationStrategy;Ljava/lang/Object;)V
public static fun encodeSerializableValue (Lkotlinx/serialization/cbor/CborEncoder;Lkotlinx/serialization/SerializationStrategy;Ljava/lang/Object;)V
}

public final class kotlinx/serialization/cbor/CborKt {
public static final fun Cbor (Lkotlinx/serialization/cbor/Cbor;Lkotlin/jvm/functions/Function1;)Lkotlinx/serialization/cbor/Cbor;
public static synthetic fun Cbor$default (Lkotlinx/serialization/cbor/Cbor;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lkotlinx/serialization/cbor/Cbor;
}

public abstract interface annotation class kotlinx/serialization/cbor/CborLabel : java/lang/annotation/Annotation {
public abstract fun label ()J
}

public synthetic class kotlinx/serialization/cbor/CborLabel$Impl : kotlinx/serialization/cbor/CborLabel {
public fun <init> (J)V
public final synthetic fun label ()J
}

public final class kotlinx/serialization/cbor/CborTag {
public static final field BASE16 J
public static final field BASE64 J
public static final field BASE64_URL J
public static final field BIGFLOAT J
public static final field BIGNUM_NEGAIVE J
public static final field BIGNUM_POSITIVE J
public static final field CBOR_ENCODED_DATA J
public static final field CBOR_SELF_DESCRIBE J
public static final field DATE_TIME_EPOCH J
public static final field DATE_TIME_STANDARD J
public static final field DECIMAL_FRACTION J
public static final field INSTANCE Lkotlinx/serialization/cbor/CborTag;
public static final field MIME_MESSAGE J
public static final field REGEX J
public static final field STRING_BASE64 J
public static final field STRING_BASE64_URL J
public static final field URI J
}

public abstract interface annotation class kotlinx/serialization/cbor/KeyTags : java/lang/annotation/Annotation {
public abstract fun tags ()[J
}

public synthetic class kotlinx/serialization/cbor/KeyTags$Impl : kotlinx/serialization/cbor/KeyTags {
public synthetic fun <init> ([JLkotlin/jvm/internal/DefaultConstructorMarker;)V
public final synthetic fun tags ()[J
}

public abstract interface annotation class kotlinx/serialization/cbor/ObjectTags : java/lang/annotation/Annotation {
public abstract fun tags ()[J
}

public synthetic class kotlinx/serialization/cbor/ObjectTags$Impl : kotlinx/serialization/cbor/ObjectTags {
public synthetic fun <init> ([JLkotlin/jvm/internal/DefaultConstructorMarker;)V
public final synthetic fun tags ()[J
}

public abstract interface annotation class kotlinx/serialization/cbor/ValueTags : java/lang/annotation/Annotation {
public abstract fun tags ()[J
}

public synthetic class kotlinx/serialization/cbor/ValueTags$Impl : kotlinx/serialization/cbor/ValueTags {
public synthetic fun <init> ([JLkotlin/jvm/internal/DefaultConstructorMarker;)V
public final synthetic fun tags ()[J
}

Loading