kotlinx.serialization
kotlinx.serialization copied to clipboard
Kotlin multiplatform / multi-format serialization
**Describe the bug** If you have an EnumClass and the json contains an element not present in the enum it will crash: `kotlinx.serialization.SerializationException: com.example.testingstuff.Numbers does not contain element with name...
**Describe the bug** For small stringified JSON, converting it to data class for small number of iterations is poor as compared to GSON. **To Reproduce** ``` { "accountNumberMaxLength": 16, "configMessage":...
**Describe the bug** I'm trying to consume events from a streaming Cometd server. Those events essentially are JSON messages transmitted over a chunked HTTP connection: whenever the server has a...
Introduce a new StringProperties object that can encode and decode properties from a string format. This new object is heavily based on the existing kotlinx.serialization `Properties` object. - for encoding,...
**What is your use-case and why do you need this feature?** Currently, Properties allow to parse `Map` object to a Kotlin class. Usually, such properties are loaded from configuration file....
This will address: #66, #204 and #251. `kotlinx.io.core.Input/Output` should replace `ByteArray`s and `String`s in Binary and String formats, thus allowing to work with streaming API and easily convert content to...
When trying to execute such code ``` @Serializer(forClass = Data::class) class MySerializer(val serializer: KSerializer) @Serializable(MySerializer::class) class Data(val t: T) ... Json.encodeToString(Data(1)) ``` an runtime error occurs ``` Exception in thread...
**What is your use-case and why do you need this feature?** I'm parsing JSON that I do not control, and which is not versioned or anything nice like that. Many...
I'm trying to shuttle data between iOS app in Swift and Kotlin apps. Kotlinx.serialization uses tag field for this: ``` [ {"type": "this", "field1": "value1"} , {"type": "that"} // no...
### What is your use-case and why do you need this feature? The JSON array and object builders are very useful, but their operations are restricted to only add elements....