title: Serialize JSON from Web service in Windows Phone 8.1
body: <p>I'm trying to serialize the result of a web service call, but when I use string result form web service it doesn't work, however, if I use a string with same content it works.</p>
  
  <p>This is the code I use to call the webservice:</p>
  
  <pre><code> var client = new HttpClient();
   var response = await client.GetAsync(new Uri(url));
   string result = await response.Content.ReadAsStringAsync();
  </code></pre>
  
  <p>Result string is this Json:</p>
  
  <pre><code>{"aa":[{"ts":"2015-01-18 21:00","bb":33783,"cc":7106,"dd":0,"ee":6775,"ff":3319,"gg":6112,"hh":6344,"ii":3703,"jj":581,"kk":-232,"ll":66},{"ts":"2015-01-18 21:10","bb":34263,"cc":7105,"dd":0,"ee":6750,"ff":3327,"gg":6224,"hh":6228,"ii":3690,"jj":1101,"kk":-232,"ll":65}]}
  </code></pre>
  
  <p>And these are the class I've used to serialize:</p>
  
  <pre><code>[DataContract]
  public class JsonClass{
      [DataMember]
      public List&lt;aaDetails&gt; aa{ get; set; }
  
  }
  
   [DataContract]
  public class aaDetails{
      [DataMember]
      public string ts { get; set; }
      [DataMember]
      public int? bb{ get; set; }
      [DataMember]
      public int? cc{ get; set; }
      [DataMember]
      public int? dd{ get; set; }
      [DataMember]
      public int? ee{ get; set; }
      [DataMember]
      public int? ff{ get; set; }
      [DataMember] 
    public int? gg{ get; set; }
          [DataMember]
          public int? hh{ get; set; }
          [DataMember]
          public int? i{ get; set; }
          [DataMember]
          public int? jj{ get; set; }
          [DataMember]
          public int? kk{ get; set; }
          [DataMember]
          public int? ll{ get; set; }
      }
  </code></pre>
  
  <p>If I tried to use the string result from web service, it doesn't work, data is NULL: </p>
  
  <pre><code>DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(JsonClass));
  
   MemoryStream memStream = new MemoryStream(Encoding.UTF8.GetBytes(result));
   JsonClass data= (JsonClass)serializer.ReadObject(memStream);
  </code></pre>
  
  <p>If I put a string with the same content and I use it, it works (data has all elements):</p>
  
  <pre><code>result = @"{""aa"":[{""ts"":""2015-01-18 21:00"",""bb"":33783,""cc"":7106,""dd"":0,""ee"":6775,""ff"":3319,""gg"":6112,""hh"":6344,""ii"":3703,""jj"":581,""kk"":-232,""ll"":66},{""ts"":""2015-01-18 21:10"",""bb"":34263,""cc"":7105,""dd"":0,""ee"":6750,""ff"":3327,""gg"":6224,""hh"":6228,""ii"":3690,""jj"":1101,""kk"":-232,""ll"":65}]}";
   DataContractJsonSerializer serializer = new 
  
   DataContractJsonSerializer(typeof(JsonClass));
  
   MemoryStream memStream = new MemoryStream(Encoding.UTF8.GetBytes(result));
   JsonClass data= (JsonClass)serializer.ReadObject(memStream);
  </code></pre>
  
  <p>I've also tried with NewtonsoftJson library and it's the same:</p>
  
  <pre><code>var data= JsonConvert.DeserializeObject&lt;JsonClass&gt;(result);
  </code></pre>
  
  <p>What am I doign wrong?
  Thank you very much!</p>