typealias ItemId = String
@Serializable
class Item<E>(
val elem: E,
val id: ItemId
)
@Serializable
class Student(
val firstname: String,
val surname: String
){
fun fullname() = "$firstname $surname"
}
typealias StudentId = ItemId
val Student.json
get() = Json.encodeToString(this)