Is it not possible to serialize custom map keys? e...
# serialization
e
Is it not possible to serialize custom map keys? eg
Copy code
@Serializable
class Foo(val a: Map<Bar, String>)

@Serializable(with = BarSerializer::class)
enum class Bar {one, two}

object BarSerializer {
  override val descriptor = PrimitiveDescriptor(..., PrimitiveKind.STRING)
  // ...
}
1
Nvm seems to work for JSON. But not for custom formats.