kotlinx.serialization icon indicating copy to clipboard operation
kotlinx.serialization copied to clipboard

Kotlin multiplatform / multi-format serialization

Results 460 kotlinx.serialization issues
Sort by recently updated
recently updated
newest added

Extension property JsonPrimitive.intOrNull returns an invalid value instead of null when the content string starts with a digit **To Reproduce** ``` @Serializable class SomeData( @SerialName("number") val number: Int ) val...

waiting for clarification

I would like to support preserving unknown fields for ProtoBuf, here is an issue for discussion beforehand. ## Motivation Basically it is required in [protobuf spec](https://protobuf.dev/programming-guides/proto3/#unknowns), so it needs to...

feature

Right now the `ProtoBuf` format allow duplicating proto ids in one message, e.g. ```kotlin @Serializable data class MessageWithDuplicateId( @ProtoNumber(3) val s: String, @ProtoNumber(3) val d: Int ) ProtoBuf.encodeToHexString(MessageWithDuplicateId("foo", 42)) //...

feature

**Describe the bug** Sometimes our server get wrong ByteArray. We hoped the server throw wrong format error immediately when we try to decode the message. However, protobuf decoder blocks until...

bug
protobuf
runtime

**Describe the bug** We updated from 1.6.2 to 1.6.3 and now nullable enums without explicit null default don't get decoded anymore, leading to an exception. **To Reproduce** ``` val json...

feature

**What is your use-case and why do you need this feature?** When encoding data as JSON, it's possible to write serialized data directly into an `OutputStream`, via [`Json.encodeToStream(SerializationStrategy, T, OutputStream)`](https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/encode-to-stream.html)....

feature
cbor

Such a code path is often used when we cannot find a type discriminator as a first key in Json (for example, if json input is invalid, and we get...

**Describe the bug** The function below sets Boolean and Numbers to null when values are put in the json object. **To Reproduce** ``` fun Intent.convertToJsonObject() = buildJsonObject { extras?.let {...

waiting for clarification

that should be part of da020f9730ffbac18b380ef25f9a9a3e09745946 (#2642) commit. See that commit message for reasoning.