I've updated documentation with an article about p...
# serialization
s
I've updated documentation with an article about polymorphic serialization, hope it will answer some of your questions: https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/polymorphism.md
🎉 9
s
This is actually extremely helpful, thank you!
What if the type information is conveyed via a property with a different key than
type
, but only in some instances? I assume this is what
SerialId
and
SerialTag
are for, but there's no documentation for either of them.
I'm interacting with an API that stores type information via an integer with key
type
for some types, and sometimes via a string with key
t
for other types. Both of these types are in the same JSON, so I can't just set the JsonConfiguration for two different class discriminators
a
@serebit -- did you ever figure out how to handle the above situation? I'm running into the same thing 😕
s
Unfortunately no, I've just kept to doing manual key reading until this is resolved