1,序列化類:
Props props = new Props();//類
props.pid = "222";
props.name = "das";
props.values = new List<PropsItem>()
{
new PropsItem(){ name ="name", vid="id"},
new PropsItem(){ name ="name", vid="id"},
};
Jayrock.Json.JsonTextWriter writer = new Jayrock.Json.JsonTextWriter();
Jayrock.Json.Conversion.JsonConvert.Export(props, writer);
string str = writer.ToString();
把json序列化對象類:
ListProps Skus = (ListProps)Jayrock.Json.Conversion.JsonConvert.Import(typeof(ListProps), propsVar.ToString());