A data class with computed property:
data class Bean(val name: String) {
val computed: String
get() = "--$name"
}
Use `kotlinx-serialization-runtime-0.20.0':
val result = Json(Stable).stringify(Bean.serializer(), Bean(name = "rj"))
the result is {"name":"rj"} but I want it to be {"name":"rj","computed":"--rj"}. How?
It is not supported yet because it is quite a rare use case
I need this feature also.
Example use case: my image urls are computed and not stored in the database.
Most helpful comment
I need this feature also.
Example use case: my image urls are computed and not stored in the database.