string results = "";
using (WebClient wc = new WebClient())
{
results = wc.DownloadString("https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%3D2344116&format=json");
}
dynamic jo = JObject.Parse(results);
var items = jo.query.results.channel.item.condition;
var code = items.code;
var temp = items.temp;
var text = items.text;
Console.WriteLine(code + " - " + temp + " - " + text);
Console.Read();Here’s a code i wrote for a sharepoint 2013 visual webpart which retrieves Istanbul’s temperature and condition text from Yahoo Weather (YQL) in JSON format and parsing.
