TreeNodeDto
@Serializable
A serializable, acyclic view of a TreeNode subtree. TreeNode itself holds a back-reference to its parent (a cycle), so it cannot be @Serializable directly — convert to/from this DTO instead.
val json = Json.encodeToString(tree.toDto())
val restored = Json.decodeFromString<TreeNodeDto<String>>(json).toTreeNode()Content copied to clipboard
Properties
Functions
Link copied to clipboard
Rebuilds a mutable TreeNode tree from this DTO.