数据data格式(数据变量名dataJson):
[{
"clausename": "特别约定", "proposalno": "TZAHXXXXXXXXXX", "clausecode": "0000 "}
{ "clausename": "期内索赔式特别约定", "proposalno": "TZAHXXXXXXXXXX22222", "clausecode": "00001111 " }]想转成list<Agreement>的格式。
我的C#类
public class Agreement{ public string ProposalNo { get; set; } public string ClauseCode { get; set; } public string ClauseName { get; set; }}
转JArray再转list
JArray agreementJArry = JArray.Parse(dataJson);Listlist= agreementJArry.ToObject
>();