title: Parsing Json in UWP
body: <p>I’m working on UWP and I’m trying to parse this Json but can't understand why this code can't work please anyone can check it with me need help. Thank you. And there is a problem in getting the list variable (List).</p>
  
  <p>Any help is appreciated.</p>
  
  <pre><code>namespace testapi2
  {                          
  
  
  /// &lt;/summary&gt;
  public sealed partial class MainPage : Page
  {
      public MainPage()
      {
          this.InitializeComponent();
          jsonCall();
      }
      public async void jsonCall()
      {
          List&lt;Result&gt; listResult = new List&lt;Result&gt;();
          var client = new HttpClient();
          HttpResponseMessage response =
          await client.GetAsync(new Uri("http://api-public.guidebox.com/v1.43/Tunisia/rKgEWJbFg0kgEHrcGXPKhPDo0XtTafyC/movies/all/250/250"));
          client.DefaultRequestHeaders.TryAddWithoutValidation("accept", "application/json");
          var array = await response.Content.ReadAsStringAsync();
          JsonArray ja = JsonValue.Parse(array).GetArray();            
          for (uint i = 0; i &lt; ja.Count; i++)
          {
              //Debug.WriteLine(i);
              Result result = new Result();
              int id = Convert.ToInt32(ja.GetObjectAt(i).GetNamedValue("id"));
              string title = ja.GetObjectAt(i).GetNamedString("title");
              int release_year = Convert.ToInt32(ja.GetObjectAt(i).GetNamedNumber("release_year"));
              int themoviedb = Convert.ToInt32(ja.GetObjectAt(i).GetNamedString("themoviedb"));
              string original_title = ja.GetObjectAt(i).GetNamedString("original_title");
             // List&lt;object&gt; alternate_titles = ja.GetObjectAt(i).GetNamedArray("alternate_titles");
              string imdb = ja.GetObjectAt(i).GetNamedString("imdb");
              bool pre_order = ja.GetObjectAt(i).GetNamedBoolean("pre_order");
              bool in_theaters = ja.GetObjectAt(i).GetNamedBoolean("in_theaters");
              string release_date = ja.GetObjectAt(i).GetNamedString("release_date");
              string rating = ja.GetObjectAt(i).GetNamedString("rating");
              int rottentomatoes = Convert.ToInt32(ja.GetObjectAt(i).GetNamedString("rottentomatoes"));
              string freebase = ja.GetObjectAt(i).GetNamedString("freebase");
              int wikipedia_id = Convert.ToInt32(ja.GetObjectAt(i).GetNamedString("wikipedia_id"));
              string metacritic = ja.GetObjectAt(i).GetNamedString("metacritic");
              string common_sense_media = ja.GetObjectAt(i).GetNamedString("common_sense_media");
              string poster_120x171 = ja.GetObjectAt(i).GetNamedString("poster_120x171");
              string poster_240x342 = ja.GetObjectAt(i).GetNamedString("poster_240x342");
              string poster_400x570 = ja.GetObjectAt(i).GetNamedString("poster_400x570");
              listResult.Add(result);                         
  
          }
         // Debug.WriteLine("hello", listResult);
          list.ItemsSource = listResult;
  
      }
  }
  }
  </code></pre>