title: Deserialize json string using datacontract serializer in c#
body: <p>Below code is used for deserializing json string from URL</p>
  
  <pre><code>string s = "http://stgxx.xxapixx.xyxxxz.com/data/statistics.json?apiversion=5.4&amp;passkey=xyxxx&amp;filter=productid:test1&amp;stats=NativeReviews";
  
  using (WebClient wc = new WebClient())  
  {
     string s1 = wc.DownloadString(s);
  
     byte[] byteArray = Encoding.UTF8.GetBytes(s1);
     MemoryStream stream = new MemoryStream(byteArray);
  
     DataContractJsonSerializer serializer =
          new DataContractJsonSerializer(typeof(BVJSONRatings));
     stream.Position = 0;
  
     BVJSONRatings yourObject = (BVJSONRatings)serializer.ReadObject(stream);
  }
  </code></pre>
  
  <p>This is the json response format</p>
  
  <pre><code>{
  "Errors": [], 
  "HasErrors": false, 
  "Includes": {}, 
  "Limit": 10, 
  "Locale": "en_US", 
  "Offset": 0, 
  "Results": [
      {
          "ProductStatistics": {
              "NativeReviewStatistics": {
                  "AverageOverallRating": 5, 
                  "OverallRatingRange": 5, 
                  "TotalReviewCount": 1
              }, 
              "ProductId": "test3", 
              "ReviewStatistics": {
                  "AverageOverallRating": 3.8333, 
                  "OverallRatingRange": 5, 
                  "TotalReviewCount": 6
               },
       }        
  ], 
  "TotalResults": 1
  }
  </code></pre>
  
  <p>I'm using the below objects to map the above json to them</p>
  
  <pre><code> public class BVJSONRatings
  {
      public string ProductId;
      public string AverageOverallRating;
      public string TotalReviewCount;
      public string TotalResults;
      public IList&lt;Results&gt; Results { get; set; }
  }
  
  public class Results
  {
      public IList&lt;ProductStatistics&gt; ProductStatistics { get; set; }
      public IList&lt;string&gt; ReviewStatistics { get; set; }
  }
  
  public class ProductStatistics
  {
      public string TotalReviewCount;
      public string AverageOverallRating;
  }
  </code></pre>
  
  <p>In the process of deserializing I'm not getting the values within "Results" all I get is just "TotalResults": 1. </p>