C# Newtonsoft中JArray 转成泛型List
错误写法:
var data = new JArray() {"hello","world" };
var list = data.ToList<string>();
以上写法会提示错误如下:
正确写法:
var data = new JArray() {"hello","world" };
var list = data.ToObject<List<string>>();
var data = new JArray() {"hello","world" };
var list = data.ToList<string>();
以上写法会提示错误如下:
var data = new JArray() {"hello","world" };
var list = data.ToObject<List<string>>();