var duanxin1 = new DuanXin(); duanxin1.RECEIVE_LOGIN_NAME = "dd"; duanxin1.RECEIVE_Number = "123"; IList<DuanXin> pList_duanxin = new List<DuanXin>(); pList_duanxin.Add(duanxin1); pList_duanxin.Add(duanxin1); pList_duanxin.Add(duanxin1); //Object To Json var JsonList= JsonConvert.SerializeObject(pList_duanxin); //Json To List var pObjListFromJson = JsonConvert.DeserializeObject<IList<duanxin>>(JsonList); if (args == null) { throw new ArgumentNullException(nameof(args)); }
.net 中 处理json 与List 互转 需要 引用
DuanXin 代码如下: