title: De serialize the JSON data in wpf
body: <p>I have a url which return's json data in the following way</p>
  
  <pre><code>{"title":"Test Title","image_url":"http://i.imgur.com/aZO5Kol.jpg","random_window":2,"windows":{"1":{"title":"Random 1"},"2":{"title":"Other Window 2"}},"thankyou_url":"http://google.com"}
  </code></pre>
  
  <p>Now i want to De-serialize this so that i can write the conditions based on the data received.
  I want achieve this </p>
  
  <p><img src="https://i.stack.imgur.com/Xdfin.jpg" alt="enter image description here"> </p>
  
  <p>will have to print the image and Name which is received  through JSON. And based on the number of windows i should show the windows</p>
  
  <p>I have declared a class </p>
  
  <pre><code> public class JsonData
  {
      string title { get; set; }
      string image_url { get; set; }
      string random_window { get; set; }
      string[] windows { get; set; }
      string thankyou_url { get; set; }
  }
  </code></pre>
  
  <p>and i have written like this</p>
  
  <pre><code>            WebClient objWebClient = new WebClient();
              var jss = new JavaScriptSerializer();
              string strJsonURL = "url";
              var vJsondata = string.Empty;
              vJsondata = objWebClient.DownloadString(strJsonURL);
               var data = jss.Deserialize&lt;object&gt;(vJsondata);
              try
              {
                var x = ((IList)data).Cast&lt;object&gt;().Select(o =&gt; o.ToString()).ToList();
              }
  </code></pre>
  
  <p>But getting this error:</p>
  
  <pre><code>Unable to cast object of type 'System.Collections.Generic.Dictionary`2[System.String,System.Object]' to type 'System.Collections.IList'.
  </code></pre>