raulraja
06/29/2021, 8:19 AMkotlinx.serialization.SealedClassSerializer
, which has a subclassSerializers: Array<KSerializer<out T>>
constructor parameter but it’s not exposed. Otherwise, I could obtain the index based on that property.
Is there any other way to obtain a stable index of a sealed subclass serializer or its descriptor with any other APIs?
If the `SealedClassSerializer is the only way to go, would the Jetbrains compiler team be open to a PR to that class to expose fun indexOf(subClassSerializer: ...): Int
or make subclassSerializers
a public val
?.
Any help is appreciated, thanks! 🙏