Is it possible to replace the default serializers for existing classes such as `kotlin.Pair` and `kotlin.Triple`? First, I attempted to set up custom serializers as contextual, but from what I understand they have a lower priority compared to the compile-time ones. Then, I tried to use typealias but it does not seem to make a difference:
typealias Tuple3<A, B, C> = @Serializable(with = CustomTuple3Serializer::class) Triple<A, B, C>
For context, I'm trying to use these serializers in a data class like the one below, so I even wonder if that’s feasible in the first place:
@Serializable
data class Value<T>(
val channel: Long,
val call: String,
val args: T, // Tuple types are used here (Pair, Triple…)
)