Re: Need Help Stepping Through Deserialized Object

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




Prior to serialization, "param1" is effectively "dtSerialized" which
looks like this:

Category myCategory = new Category();

foreach (DataRow row in dt.Rows)
{
myCategory.field.id = (int)row["categoryid"];
myCategory.field.path = (string)row["cat_path"];
}

dtSerialized = JSONHelper.Serialize<Category>(myCategory)

This is my Category Class:

public class Category {
public Category() { }
public Field field = new Field();
public string model{get; set;}
public int jsonkey { get; set; }
}

public class Field {
public Field(){ }
public int level { get; set; }
public int id { get; set; }
public int parentid { get; set; }
public string name { get; set; }
public string path { get; set; }
}
.



Relevant Pages