user3378513 February 2016
Convert a Treeview to JSON using C#
I have to convert a Treeview object to JSON using C#. I am currently using JsonConvert.SerializeObject().
public class SubTreeNode : TreeNode
public CustomProperties customProperties;
public class CustomProperties
public string property1 = "Property1";
public string property2 = "Property2";
public string property3 = "Property3";
When tried with JsonConvert.SerializeObject(treeView1.Nodes);
It only gives top nodes...not getting the child nodes, sub-child & so on.
What is the easiest way to Serialize and deserialize this Treeview object.
Thanks a million in advance!
Asked in February 2016
Viewed 1,953 times
Answered 1 times
Leave an answer
Quote of the day: live life