async private void loadJsonInfo()
{
try
{
//--------- Having content from website--------------
HttpClient http = new HttpClient();
var response = await http.GetByteArrayAsync("http://emresevinc.github.io/exrepo.html");
String source = Encoding.GetEncoding("utf-8").GetString(response, 0, response.Length - 1);
source = WebUtility.HtmlDecode(source);
HtmlDocument resultat = new HtmlDocument();
resultat.LoadHtml(source);
List<HtmlNode> toftitle = resultat.DocumentNode.Descendants().Where
(x => (x.Name == "div" && x.Attributes["class"] != null &&
x.Attributes["class"].Value.Contains("container"))).ToList();
String text = toftitle[0].InnerText;
selectedMovie = new Movie();
//----------------------------------------------------
_jObject = JsonObject.Parse(text); // Burada json dosyası parse ediliyor.
jArr = _jObject.GetNamedArray("movies"); // Json verileri içindeki movies array'i
fillToMovieList();
}
catch (Exception)
{
new MessageDialog("Bir hata gerceklesti").ShowAsync();
}
}