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?v79
11/10/2023, 1:08 PMPostNode
constructor, and they are working fine.v79
11/10/2023, 1:12 PMephemient
11/10/2023, 4:36 PM@Transient lateinit
should workephemient
11/10/2023, 4:36 PMv79
11/10/2023, 4:47 PM