Json字符转化成对象
//后台
string jsonArray = "";//此处json对象的属性必须和类库一样
JavaScriptSerializer json = new JavaScriptSerializer();
List<payParameter> list = new List<Reconciliation.payParameter>();
payParameter user = json.Deserialize<payParameter>(jsonArray);
//类库
[Serializable]
public class payParameter
{
public string TotalItems { get; set; }
public SaveReconciliationDtoList[] SaveReconciliationDtoList { get; set; }
}
[Serializable]
public class SaveReconciliationDtoList
{
public string MerCustId { get; set; }
public string UsrCustId { get; set; }
}