I need to write the contents of an array that returned from a Json deserialization (return from a Json with more than one level), follow the line with the method that extracts the array:
Departmants dept = new Departmants();
dept.Property1 = JsonConvert.DeserializeObject<Department[]>(json);
Class with array structure:
public class Departmants
{
public Department[] Property1 { get; set; }
}
public class Department
{
public int id { get; set; }
public string name { get; set; }
public bool temSub{ get; set; }
public Sub[] subitem{ get; set; }
}
public class Sub
{
public int id { get; set; }
public string name { get; set; }
public bool temSub{ get; set; }
public object[] subitem{ get; set; }
}
Thank you in advance for those who can help.