arve
06/30/2025, 7:52 AMimport kotlinx.serialization.StringFormat
import kotlinx.serialization.json.Json
private val format: StringFormat = Json { encodeDefaults = true }
object MyFormat : StringFormat by format
When I try to inline format
the expression insists on referring to the class Json
instead of the factory function Json
Any tips to avoid the intermediate format
variable?ephemient
06/30/2025, 11:22 AMobject MyFormat : StringFormat by (Json { encodeDefaults = true })