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
I would like to deserialize structures, that are partly arbitrary. For example when I want to deserialize the [mustache specification], most of the structure can be properly deserialized with somethling like
@Serializable
data classSpecification(
valoverview:String,
valtests:List<Test>,
)
@Serializable
data classTest(
valname:String,
valdesc:String,
valtemplate:String,
valexpected:String,
valpartials:Map<String, String> = emptyMap(),
valdata:YamlNode? = null, // not serializable
)
but the data can't be, because it can be arbitrary nested or even just a primitive value.
Describe the solution you'd like
I would like to have YamlNode as Serializable (similar as done by the kotlinx team for the JsonElement).
Describe alternatives you've considered
I could write it on my own in my project, but I think, this would be really valuable to the library. Another alternative is to read the whole structure as YamlNode and then parse everything on with the node, but that reduces the usability.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the problem you'd like to solve
I would like to deserialize structures, that are partly arbitrary. For example when I want to deserialize the [mustache specification], most of the structure can be properly deserialized with somethling like
but the
data
can't be, because it can be arbitrary nested or even just a primitive value.Describe the solution you'd like
I would like to have
YamlNode
asSerializable
(similar as done by the kotlinx team for theJsonElement
).Describe alternatives you've considered
I could write it on my own in my project, but I think, this would be really valuable to the library. Another alternative is to read the whole structure as
YamlNode
and then parse everything on with the node, but that reduces the usability.Additional context
No response
The text was updated successfully, but these errors were encountered: