Jobject 使用

 

 obj2 = JObject.Parse(result.Html);

JArray _Jarr = _obj["data"]["siteList"].Value<JArray>();
if (_Jarr == null)
return;
//bool isym= _Jarr.Any(p => p["url"].Value<string>().Contains("gangzan.com"));

   //bool hasErr = _obj.Properties().Any(p => p.Name == "err");//或是这样
                //var names = from domains in _obj["data"]["siteList"].Children()
                //            select (string)domains["url"];
                ////foreach (var name in names)
                ////{

                ////}
                //return names;
                //

                
                //IEnumerable<JProperty> properties = _obj.Properties();
                //foreach (JProperty item in properties)
                //{

                //    Console.WriteLine(item.Name + ":" + item.Value);
                //}
                

                //MessageBox.Show(_obj["data"]["siteList"][0].Value<string>());

 

//保留数据
//JEnumerable<JToken> ss = _Jarr[0]["tkSpecialCampaignIdRateMap"].Children();
//foreach (var items in ss)
// DPlan.Add(((JProperty)(items)).Name, float.Parse(((JProperty)(items)).Value.ToString()));
var dicSort = from objDic in DPlan orderby objDic.Value descending select objDic;

没有更多推荐了,返回首页