1.用 NuGet 安裝 Newtonsoft.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;
Jobs said: There's no reason not to follow your heart.