kotlinx.serialization
kotlinx.serialization copied to clipboard
Kotlin multiplatform / multi-format serialization
Can be merged after moving to Kotlin 2.1.20, which introduces kotlin.time.Instant. kotlinx.datetime.Instant entered the stdlib as kotlin.time.Instant, and so kotlinx.serialization takes over its serializers. See https://github.com/Kotlin/KEEP/pull/387
**What is your use-case and why do you need this feature?** I'd like a way to generate a JSON schema from a (serializable) type. It would likely share an implementation...
This PR is for the first batch of documentation updates for [KT-66330](https://youtrack.jetbrains.com/issue/KT-66330/Docs-Integrate-Serialization-docs-from-GitHub-to-kotlinlang.org) Additional PRs will be opened on this one.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/2994
**Describe the bug** When the json parser encounters an unexpected token while parsing a data object deep in a json structure (>= 8 levels), it throws ArrayIndexOutOfBoundsException. This seems to...
This patch set creates a simple implementation of the EfficientBinaryFormat. It is included in the existing json tests (special casing json specific serializers). This should ensure that serialization works with...
- Previously, calculating next capacity for large values like 1_073_741_824 caused overflow and returned Integer.MIN_VALUE. - Rewrote `ensureCapacity` to use `Long` for arithmetic to guard against exceeding Int.MAX_VALUE. - Introduced...
**Describe the bug** When a class with multiple default values is encoded into a ```CborArray``` with ```encodeDefaults = false```, the information about which value has changed from the default isn't...
For CBOR serialization, I assign a tag as so, ``` @Serializable data class Something( @ValueTags(MY_TAG) @Contextual val myObject: MyObject? ) ``` and I have a serializer like ``` object MyObject...