close
1.用 NuGet 安裝 Newtonsoft.Json
2.引用
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
3.常用方法
string strContext="json字串";
2.引用
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
3.常用方法
string strContext="json字串";
dynamic json = JValue.Parse(strContext);
string id = "", sourcesLinks = "";
int iCompany = 0, iComment = 0;
iCompany = json.data["searchCompanies"].Count;
iComment = json.data["searchCompanies"][0].comments.Count;
sourcesLinks = json.data["searchCompanies"][0].sourcesLinks[1];
id = json.data["searchCompanies"][0]._id;
全站熱搜
留言列表