kotlinx.serialization
kotlinx.serialization copied to clipboard
Kotlin multiplatform / multi-format serialization
I could swear there was an issue for this somewhere, but I couldn't find it. May be a duplicate. **What is your use-case and why do you need this feature?**...
**Describe the bug** I have a simple Kotlin script (`foo.kts`): ``` kotlin import kotlinx.serialization.Serializable import kotlinx.serialization.json.Json import kotlinx.serialization.encodeToString @Serializable data class Foo(val a: Int, val b: String) val str: String...
## What is your use-case and why do you need this feature? I have a 3rd party format (knbt)[https://github.com/BenWoodworth/knbt] and [a request in slack](https://kotlinlang.slack.com/archives/C046BGVBJEP/p1710070357041719?thread_ts=1710030185.126079&cid=C046BGVBJEP) to implement a class discriminator mode...
Hello, I have switched to agp 8.3.1 on my Android project and if I activate the minify I have the following problem. `kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 0: Serializer...
**What is your use-case and why do you need this feature?** If a type is annotated with `@Contextual`, but there is no serializer in context, it will use the type's...
Keep access to plugin generated serializer when mark class with @Serializable(with = MySerializer)
### What is your use-case and why do you need this feature? When we write custom serializer for class, which contains plugin generated serializer inside, we cannot use `with` parameter...
**What is your use-case and why do you need this feature?** I'm using Compose, which defines quite a few inline classes (aka single-value value classes), for example `Dp`, which is...
 ```kotlin package models import androidx.compose.runtime.MutableState import androidx.compose.runtime.mutableStateListOf import androidx.compose.runtime.snapshots.SnapshotStateList import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.builtins.ListSerializer import kotlinx.serialization.descriptors.SerialDescriptor import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder @Serializable data class Server( var id:Int, var name:MutableState,...
**What is your use-case and why do you need this feature?** hello. Suppose I have an abstract type 'Command' that can be extended by third parties. I want it to...
**Describe the bug** With the `ProtoBuf` format, it seems a `ByteArray` is encoded as a collection of numbers. How do I encode the raw bytes directly as the `bytes` type...