C# TreeView to JSON and Back

Here’s a C# class for persisting a TreeView to JSON, and for restoring a TreeView from JSON. [csharp] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace ChilkatRelease { public class TreeviewPersist { // Persist the TreeView to a JSON string. static public string ToJson(TreeView treeView) …