Bernhard
10/04/2026, 11:17 AM{
"id": "",
"name": "",
"email": ""
}
should serialize onto
data class User(val id: String, val common: Common) { data class Common(val name: String, val email: String)}
what am I looking for? is there an API for that use case or do I need to handroll everything?ephemient
10/04/2026, 1:43 PM@JsonUnwrapped like other frameworks, so you'll have to do it yourselfephemient
10/04/2026, 1:44 PMephemient
10/05/2026, 8:20 PMinterface Common {
val name: String,
val email: String,
}
@Serializable
data class User(
val id: String,
override val name: String,
override val email: String,
) : Common
then it'll directly produce the JSON you wantBernhard
10/06/2026, 8:37 AM