kotlinx.serialization
kotlinx.serialization copied to clipboard
Kotlin multiplatform / multi-format serialization
**Describe the bug** This works appropriately before Kotlin 2.0. ``` ERROR: org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationResolveExtension caused LinkageError java.lang.NoSuchFieldError: Class org.jetbrains.kotlin.name.ClassId does not have member field 'org.jetbrains.kotlin.name.ClassId$Companion Companion' at org.jetbrains.kotlinx.serialization.compiler.resolve.SerializationAnnotations.(NamingConventions.kt:48) at org.jetbrains.kotlinx.serialization.compiler.resolve.KSerializationUtilKt.getHasSerializableAnnotation(KSerializationUtil.kt:185) at org.jetbrains.kotlinx.serialization.compiler.resolve.KSerializationUtilKt.getHasSerializableAnnotation(KSerializationUtil.kt:182)...
**What is your use-case and why do you need this feature?** Currently, annotating a property with an annotation having `MetaSerializable` instructs the serialization plugin to treat the annotated data class...
Able to compile code and generate .apk file and Below is the error we are getting during runtime. 07-02 13:57:49.245 19976 20076 E AndroidRuntime: FATAL EXCEPTION: pool-2-thread-5 07-02 13:57:49.245 19976...
**Describe the bug** Given a serializable data class having a value class wrapping a primitive type, the field is serialized using `.encodeSerializableElement(serialDesc, 0, (SerializationStrategy)myData.$serializer.INSTANCE, myData.box-impl(self.value))` instead of `encodeInlineElement(serialDesc, 0).encodeInt(self.value)`, forcing...
* Move 'exception safety' section closer to the related exception guarantees section in Decoder/Encoder docs. * Recommend using a fully qualified names in examples with SerialDescriptor creation
for subclasses' polymorphic serializers if Json.classDiscriminatorMode is set to NONE. This should simplify the code in situations where JSON is expected to be only sent and not parsed. Fixes #2753...
It will allow new clients to benefit from this JVM feature while still generating $DefaultImpls for older clients.
Restructured and migrated documentation to Writerside, which will be imported to kotlinlang.org after merging.
**Describe the bug** When I have internal typealias DependencyMap = @Serializable(DependencyMapSerializer::class) Map I'd expect to be able to do internal typealias DependencyMap = @Serializable(DependencyMapSerializer::class) @KeepGeneratedSerializer Map but that does not...
**What is your use-case and why do you need this feature?** I know [keys can be ignored "globally"](https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/json.md#ignoring-unknown-keys) on the JSON builder scope. But for safely, and to better document...