https://kotlinlang.org logo
Title
u

user

07/13/2022, 9:11 PM
Kotlin JSON deserialization with nested class discriminator I want to use a class discriminator in Kotlin to get polymorphic deserialization of JSON messages. The problem is that the class discriminator in my messages is nested one level deep: { "header": { "message_type": "FooBar" } "data": {...} } The contents of data depend on message_type. If message_type were one level higher, this would...