Dynamic Object with Dollar on String

前端 未结 1 973
滥情空心
滥情空心 2021-01-20 00:50

Im usíng this code to get views of video from youtube:

WebClient ccn = new WebClient();

string dog = ccn.DownloadString(\"https://gdata.youtube.com/feeds/ap         


        
1条回答
  •  猫巷女王i
    2021-01-20 01:25

    You can use JObject

    var obj = JObject.Parse(dog); //(OR JsonConvert.DeserializeObject(dog) as JObject;)
    
    foreach (string view in obj["entry"]["media$group"]["yt$statistics"]["viewCount"])
    {
    
    }
    

    0 讨论(0)
提交回复
热议问题