C#中webservice接受数组参数

xiaoxiao2021-02-28  53

背景:需要在前端向服务器请求时,向服务器上的webservice接口传数组,C#需要对数组进行一下格式化处理来接受。

JArray jo = (JArray)JsonConvert.DeserializeObject(pointarry);   

pointarry为传递过来的数组元素,利用Newtonsoft.Json类中JsonConvert对数组进行格式化转化为JArray数组,之后对数组再进行遍历就可以逐条处理了

转载请注明原文地址: https://www.6miu.com/read-55208.html

最新回复(0)