title: String from Httpresponse not passing full value
body: <p>HI i am in desperate need for help here,</p>
  
  <p>I am making a web request and getting a json string with <code>Response.ContentLenth=2246</code> but when i parse it in a string it gives only few 100 characters, i traked it down that it is only getting  values less than 964. strings length is still 2246 but remaining values are just <code>(\0)</code> <code>null</code> characters. Its also giving an error <code>Unterminated string passed in. (2246):</code> at following line</p>
  
  <pre><code> FacebookFeed feed = sr.Deserialize&lt;FacebookFeed&gt;(data);
  </code></pre>
  
  <p>It works fine if the response stream contains characters less than 964 chars.</p>
  
  <p>Following is the extract from the full code error encountered in last line.</p>
  
  <pre><code>    System.Web.Script.Serialization.JavaScriptSerializer sr = new System.Web.Script.Serialization.JavaScriptSerializer();
      System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(@"https://graph.facebook.com/100000570310973_181080451920964");
      req.Method = "GET";
      System.Net.HttpWebResponse res = (System.Net.HttpWebResponse)req.GetResponse();
  
      byte[] resp = new byte[(int)res.ContentLength];
      res.GetResponseStream().Read(resp, 0, (int)res.ContentLength);
      string data = Encoding.UTF8.GetString(resp);
      FacebookFeed feed = sr.Deserialize&lt;FacebookFeed&gt;(data);
  </code></pre>
  
  <p>error given is</p>
  
  <pre><code>Unterminated string passed in. (2246): {"id":"100000570310973_1810804519209........ (with rest of data in the string data including null chars)
  </code></pre>
  
  <p>following is the shape of classes used in my code:</p>
  
  <pre><code>public class FacebookFeed
  {
      public string id { get; set; }
      public NameIdPair from { get; set; }
      public NameIdPair to { get; set; }
      public string message { get; set; }
      public Uri link{get;set;}
      public string name{get; set;}
      public string caption { get; set; }
      public Uri icon { get; set; }
      public NameLinkPair[] actions { get; set; }
      public string type { get; set; }
      public NameIdPair application { get; set; } //Mentioned in Graph API as attribution
      public DateTime created_time { get; set; }
      public DateTime updated_time { get; set; }
      public FacebookPostLikes likes { get; set; }
  }
  
  public class NameIdPair
  {
      public string name { get; set; }
      public string id { get; set; }
  }
  
  public class NameLinkPair
  {
      public string name { get; set; }
      public Uri link{get; set;}
  }
  
  public class FacebookPostLikes
  {
      public NameIdPair[] data { get; set; }
      public int count { get; set; }
  }
  </code></pre>