When using polymorphic serialization is there any way to1. have the class discriminator available as a property on the base class
2. default to a particular subclass?
My usecase has the
property on the json object somewhat overloaded where for one value i want to deserialize it into class A, but any other value is of type B and I need access to the
as a property gives an error
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
I couldnt find any reference too array polymorphism anywhere