Tech
09/23/2023, 12:15 PM@Polymorphic
@Serializable
abstract class BaseData {
@SerialName("some_random_type")
val someRandomType: String
}
@Serializable
data class ImplementedData(
override val someRandomType: String
) : BaseData()
I need the @SerialName property to be passed down to the child without me having to manually specify it again on ImplementedData
, I looked at the docs and didn't really see any reference to what I'm trying to do.
Thank you in advance!