v79
11/10/2023, 12:23 PMsealed class Node {
abstract var key: String
data class PostNode(val title: String) : Node {
override lateinit var key: String
}
}
And a sample yaml file might simply be:
title: This is a post
Kaml can't deserialize this, as it says that "key" is required but missing. My understanding was that only properties in the primary constructor are required?PostNode
constructor, and they are working fine.ephemient
11/10/2023, 4:36 PM@Transient lateinit
should workv79
11/10/2023, 4:47 PM