title: Deserializing JSON throws TargetInvocationException
body: <p>My data json format is:</p>
  <pre><code>[{&quot;Email&quot;:&quot;apatil.558@gmail.com&quot;,&quot;EmpCode&quot;:&quot;10004&quot;,&quot;MobileNo&quot;:&quot;&quot;,&quot;Name&quot;:&quot;Sample Manager Eternus User&quot;,&quot;Pan&quot;:&quot;MMMMM9876M&quot;,&quot;Photo&quot;:null,&quot;message&quot;:{&quot;Message&quot;:&quot;Success&quot;}}]
  </code></pre>
  <p>So I wrote this class to deserialize it to:</p>
  <pre><code>public class EmpDetails
  {
      public string Email { get; set; }
      public string EmpCode { get; set; }
      public string MobileNo { get; set; }
      public string Name { get; set; }
      public string Pan { get; set; }
      public string Photo { get; set; }
      public string Message { get; set; }
  }
  </code></pre>
  <p>I tried to read it using this code:</p>
  <pre><code>private void SihnIn_OnClick(object sender, RoutedEventArgs e)
  {
       string uri = &quot;http://xyz.d.in/service1.svc/getUser/MMMMM9876M/10004&quot;;
       WebClient webClient = new WebClient();
       webClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(DownloadStringCompleted);
       webClient.DownloadStringAsync(new Uri(uri));
  }
  
   void DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
    {
       var jsonData = JsonConvert.DeserializeObject&lt;EmpDetails&gt;(e.Result); //Getting Error in this line
       string getEmail = jsonData.Email;
    }
  </code></pre>
  <p>Yet <code>JsonConvert.DeserializeObject&lt;EmpDetails&gt;(e.Result)</code> throws an exception:</p>
  <blockquote>
  <p>An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in System.Windows.ni.dll</p>
  <p>Additional information: Exception has been thrown by the target of an invocation.</p>
  </blockquote>
  <p>How can I deserialize this JSON?</p>