Relative Content

Tag Archive for androidkotlinkotlinx.serialization

Get SerialName param from child class in Kotlin kotlinx serialization

I have a parent class RequestFieldResponseBody and two classes that inherit from it (CreateRequestFieldBody and EditRequestFieldBody). I would like to make it so that depending on the child class my id is converted to SerialName("request_field") and @SerialName("issue_field") respectively