kotlinx.serialization
kotlinx.serialization copied to clipboard
Kotlin multiplatform / multi-format serialization
Consider the following (meaningless) class: ```kotlin @Serializable class Box(val i: Int) { fun T.withT() = i } ``` If we try to use it ```kotlin @Serializable class Data3(val d: Box)...
The following incomplete code cannot be used because `@Contextual` doesn't work in `serializer()` . This code would allow for very short definitions of server endpoints that handle serialization across multiple...
**What is your use-case and why do you need this feature?** I have an open interface, say `MyOpenInterface`. I have an implementation of this open interface which is sealed i.e....
``` kotlinx.serialization.SerializationException: Serializer for class 'List' is not found. Please ensure that class is marked as '@Serializable' and that the serialization compiler plugin is applied. ``` **Environment** - Kotlin version:...
### What is your use-case PR #2345 added an option to **de**serialize enum values in a case-insensitive manner. However, this only solves the problem in one direction. In an application...
**Describe the bug** Giving a simple proto message: ```protobuf message ProtoMap { map map = 1; } message TypeValue { int32 value = 1; } ``` Our backend server in...
**Describe the bug** ``` java.lang.NullPointerException at kotlinx.serialization.SealedClassSerializer$special$$inlined$groupingBy$1.keyOf(_Collections.kt:1547) at kotlinx.serialization.SealedClassSerializer.(SealedSerializer.kt:158) at kotlinx.serialization.SealedClassSerializer.(SealedSerializer.kt:97) ``` This only happens if a child has a reference to the parent interface, in this case `SealedClassSerializer.subclassSerializers` has...
**What is your use-case and why do you need this feature?** Output the enum and primitive correctly. If we add a PrimitiveKind descriptor to a subclass of polymorphic serializer. There...
error occur at release version, no error with debug. I have tried to add keep rules in proguard file, but take no effect! 【keep rules】 -keep class kotlinx.serialization.json.**{*;} -keep class...
See https://github.com/Kotlin/kotlinx.serialization/pull/2742 for the benchmarks. Currently, decoding from the buffered source using kotlinx-serialization is unreasonably slow compared to Moshi. One of the reasons is that we do not leverage [select](https://square.github.io/okio/3.x/okio/okio/okio/-buffered-source/select.html)...