Newtonsoft.Json.Linq

 

 

 

var json = "{\"name\":\"ok1\",\"sex\":\"man\"}";
            //Newtonsoft.Json.Linq 将json转换成IEnumerable集合对象在遍历 
            string ids = ((IEnumerable)json).Cast<Newtonsoft.Json.Linq.JObject>().
                Aggregate("", (a, item) => a + (item["name"]) + ",");

 

posted @ 2016-01-08 10:18  dragon.net  阅读(860)  评论(0编辑  收藏  举报