Not sure if put this here or in Ktor
I have a custom sealed class which works perfectly via local strings and ktor request if I use my custom serializer
@Serializable(with = CustomSealedClassSerializer::class)
. But I want to remove the dependency on
json
this sealed class in that Gradle module so I tried to use a
SerializerModule
Json {
serializersModule = SerializersModule {
contextual(CustomSealedClassSerializer::class) { args -> CustomSealedClassSerializer(args[0], args[1] }
}
...
}
This is working perfectly with local strings, but with Ktor
2.0.0-alpha-1
and doing a request, it is not working, and debugging I am getting that
args
list is empty.
Is there any workaround?