russhwolf / multiplatform-settings

A Kotlin Multiplatform library for saving simple key-value data
Apache License 2.0
1.69k stars 67 forks source link

DRAFT: Add extensions for use with kotlinx.serialization #36

Closed russhwolf closed 3 years ago

russhwolf commented 4 years ago

Looking for API feedback. The idea here is to enable arbitrary datatypes to be encoded inside a Settings instance.

Some questions:

  1. Are there serialization edge-cases that should be added to the tests? One thing currently missing is a test of polymorphic serialization.
  2. Is it a problem that the delegate APIs talk directly to the encoder/decoder rather than through a format? I think that means polymorphic serialization won't work on the delegate, but I don't know if that's an important use-case or not
  3. Does the public API seem clean enough or are there adjustments I should make?

The CI build will fail. I think it's because of missing native platforms in kotlinx.serialization

russhwolf commented 4 years ago

For the sake of documenting it out loud, I should note that the versioning questions mentioned here apply to this PR as well

russhwolf commented 3 years ago

This was released with 0.7