You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is your use-case and why do you need this feature?
Currently, one need to rename every implemented field of a parent class/interface:
interface Project {
val name: String
val originalTime: Long
}
@Serializable
class OwnedProject(
@SerialName("custom_name")
override val name: String,
@SerialName("original_t")
override val originalTime: String
) : Project
@Serializable
class OtherProject(
@SerialName("custom_name")
override val name: String,
@SerialName("original_t")
override val originalTime: String,
val other: String
) : Project
Describe the solution you'd like
It should be able to use @SerialName on parent fields:
interface Project {
@SerialName("custom_name")
val name: String
@SerialName("original_t")
val originalTime: Long
}
@Serializable
class OwnedProject(
override val name: String,
override val originalTime: String
) : Project
@Serializable
class OtherProject(
override val name: String,
override val originalTime: String,
val other: String
) : Project
The text was updated successfully, but these errors were encountered:
What is your use-case and why do you need this feature?
Currently, one need to rename every implemented field of a parent class/interface:
Describe the solution you'd like
It should be able to use
@SerialName
on parent fields:The text was updated successfully, but these errors were encountered: