Would it be possible to find a method to convert a TreeModel into a JSON string for storage purposes and then use tree.parse()
to reconstruct it later on?
Whenever trying JSON.stringify(root)
, an error is thrown due to cyclic references caused by children containing parents and vice versa.