Suppose you got object like this in list format-
Student: {
Name:'SomeName',
Address:'Address',
Phone:'Phone'
},
.
.
.
Then you create a concrete class with properties as for one of repetitive object -
public class Student{
public string Name{get;set;}
public string Address{get;set;}
public string Phone{get;set;}
}
e.g. Object that you get -
var listObject= new List<Object>
{
new {Name = "Alan", Address = "Doe", Phone = "123456"},
new {Name = "Alan", Address = "Doe", Phone = "123456"},
};
Serializing ^ object in Student Form -
using Newtonsoft.Json;
var studentSerialized = JsonConvert.SerializeObject<List<Student>>(listObject);
It will match propert names and will return you List<Student>
. Now for treeview you try the same with List
type property.