Kotlin / kotlinx.collections.immutable

Immutable persistent collections for Kotlin
Apache License 2.0
1.12k stars 56 forks source link

Make collections serializable with kotlinx.serialization #138

Closed jfontsaballs closed 1 year ago

jfontsaballs commented 1 year ago

The title explains the requested functionality quite clearly.

My use case is that I'm passing information between a Ktor server and a KotlinJS client. I have a shared data model in a multiplatform module and I send and receive data between server and client by serializing classes to JSON and sending it via HTTP calls. I'm using kotlinx.serialization for serialization and deserialization. The classes in the shared module are designed to be immutable and I thought the using immutable collections would just fit nicely until I discovered that they can't be serialized.

Right now I'm using regular Kotlin collections but modifications are more difficult.

JakeWharton commented 1 year ago

Duplicate of #63

jfontsaballs commented 1 year ago

Duplicate of #63