首页 > 代码库 > C#中将string类型的json字符串转化成数组

C#中将string类型的json字符串转化成数组

 JObject json1 = (JObject)JsonConvert.DeserializeObject("ReContent");       

      JArray array = (JArray)json1["Phones"];         

    string aa = "";

            foreach (var jObject in array)       

      {         

        //赋值属性     

            aa = jObject[""].ToString();//获取字符串中id值   

          }

 

using Newtonsoft.Json.Linq;

using Newtonsoft.Json;

using System.Collections.Generic;

C#中将string类型的json字符串转化成数组