输入行是:
{"policies":[{"policyNum":"","policyInsurer":"","dateSign":"","dateIssue":"","dateBeg":"","dateEnd":"","insurancePremium":0.0,"status":"","agrType":"","docSer":"","docNo":0.0,"paid":0,"postPayment":0.0,"quantity":0,"addList":[{"addIsn":0.0,"addId":"","addTypeIsn":0.0,"addTypeName":"","dateBeg":"","dateEnd":"","premium":0.0,"deltaPrem":"",}]"productItems":"","state":"",}]}
分别编写了从平板电脑到 json 的转换器,以格式化我使用的这个术语:
jsontb.Text = JsonConvert.SerializeObject(JsonConvert.DeserializeObject(json), Newtonsoft.Json.Formatting.Indented);
但是在这一行我得到一个Exeption,虽然json看起来有效,但我也在网站上检查过,一切正常,我不明白问题是什么。
Newtonsoft.Json.JsonReaderException:“解析值后遇到意外字符:”。路径 'policies[0].addList',第 1 行,位置 342。”