kotlinx.serialization
kotlinx.serialization copied to clipboard
Kotlin multiplatform / multi-format serialization
**What is your use-case and why do you need this feature?** For JSON, there is an option to specify `explicitNulls = false` ([docs](https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-builder/explicit-nulls.html)) to omit properties with null values. It...
**To Reproduce** ```kotlin @file:UseSerializers(BruhSerializer1::class) class Bruh @Serializable class HolderB(val b: List) object BruhSerializer1: KSerializer { override val descriptor: SerialDescriptor get() = TODO("descriptor1") override fun serialize(encoder: Encoder, value: Bruh) { TODO("serialize1")...
**What is your use-case and why do you need this feature?** Currently, one need to rename every implemented field of a parent class/interface: ``` interface Project { val name: String...
I have a serious performance issue when parsing. To demonstrate how it works, I wrote the following code to compare the performance of native `JSON.parse` and `Json { ignoreUnknownKeys =...
**What is your use-case and why do you need this feature?** Describing a recursive structure as a `SerialDescriptor` is a pain. The docs say to use the [`buildClassSerialDescriptor`](https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/serializers.md#hand-written-composite-serializer) for describing...
**What is your use-case and why do you need this feature?** There is an extension for encoding structures (`encodeStructure`) but no extension for encoding collection which would be useful for...
[Reproducer here!](https://github.com/Kotlin/kotlinx.serialization/files/7506463/repro.zip) Using latest versions of kotlinx serialization and Kotlin. Also tested on JDK 15 and 1.8. When compiling it errors with: ``` text > Task :compileKotlin FAILED e: java.lang.IndexOutOfBoundsException:...
ProtoBuf's `ProtoPacked` annotation only worked for the original signed primitives and ByteArray, and did not work for unsigned variants.
This is the fifth part of the Kotlin Serialization rewrite task. Related Youtrack ticket: [KT-81979](https://youtrack.jetbrains.com/issue/KT-81979)
fixes #2975 This PR introduces structured CBOR encoding and decoding ## Encoding from/to `CborElement` Bytes can be decoded into an instance of `CborElement` with the [Cbor.decodeFromByteArray] function by either manually...