Javier

    Javier

    7 months ago
    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?
    Dominaezzz

    Dominaezzz

    7 months ago
    Sounds like a #ktor problem.
    Aleksei Tirman [JB]

    Aleksei Tirman [JB]

    7 months ago
    Does it work with Ktor 1.6.7? Could you please share a code snippet to reproduce this issue?
    Javier

    Javier

    7 months ago
    Ktor 2.0.0-beta-1
    I will create a minimum repro
    Aleksei Tirman [JB]

    Aleksei Tirman [JB]

    7 months ago
    There is only beta version 🙂
    Javier

    Javier

    7 months ago
    Ah yeah, beta-1 I forgot the correct stage
    @Aleksei Tirman [JB] I created an issue in YouTrack, here is the link: https://youtrack.jetbrains.com/issue/KTOR-3782