New to Kotlin and ktor. I am having some issues wi...
# ktor
b
New to Kotlin and ktor. I am having some issues with a type and some json. The error I am seeing is:
Sealed class 'nullable' cannot be serialized as base class 'foo' because it has property name that conflicts with JSON class discriminator 'type'. You can either change class discriminator in JsonConfiguration, rename property with @SerialName annotation or fall back to array polymorphism
-> https://gist.github.com/codedmart/2746db1a4d62cdc3f1b1fd2eea447eb0. Any pointers would be great. I tried a few things, but it either removed
type
from json or trying to change the discriminator changed the json to that discriminator.
Ah I got it with a custom serializer and deserializer.