提问
数组对象如何赋值给JToken
回答
- 创建一个JsonArray字符串
- 将字符串装维JArray
- JArray赋值给JToken
var strIps = $"[\"{string.Join("\",\"", rootObject.IpRateLimiting.IpWhitelist)}\",\"::1/10\"]";
var ips = JArray.Parse(strIps);
jsonObject["IpRateLimiting"]!["IpWhitelist"] = ips;
标签:JArray,JToken,ips,数组,IpRateLimiting,赋值
From: https://www.cnblogs.com/wuhailong/p/17534760.html