2 years ago
    I am attempting parse a complex JSON structure with a custom double serializer. Is there a simpler way to tell the parser to use a customer serializer instead of having to mark every property with
    @Serializable(with = CustomDoubleSerializer::class)
    since there are a large number of these formatted doubles. Thank you.
    I tried this:
    val hooked = serializersModuleOf(Double::class, CustomDoubleSerializer)
                        val hookedparser = Json(configuration = JsonConfiguration.Stable.copy(strictMode = false, useArrayPolymorphism = true), context = hooked)
                        val response = hookedparser.parse(GetStatsResponse.serializer(), result)
    but it does not hit my custom parser when parsing the outer object.