What is the best approach in kotlinx.serialization...
# getting-started
j
What is the best approach in kotlinx.serialization to encode parameterised values, ie:
Copy code
enum class Status(val value: Int) {
  Ok(0),
  NotOk(1),
  SomeOtherStatus(2)
}
For example, if the incoming JSON has
1
, I want it to be decoded into
Status.NotOk
k
try #serialization
Although the default will serialize/deserialize enums as names
j
Thanks! 🙏 Will try it out.