Manoj

Manoj

  • NA
  • 90
  • 10.7k

Cannot deserialize the current JSON object

Apr 1 2019 12:45 PM
Hello,
 
Line 18 generates an error " Cannot deserialize the current JSON object".
 
I have 2 projects in a solution. Project 1 is MVC that  need to use data from 2nd  webapi project.
 
Waiting for your quick help,
Thanks 
 
I have attched screenshots. 
 
 
 
Line 16: IEnumerable<mvcEmployeeModel> empList;
Line 17: HttpResponseMessage response = GlobalVariables.WebApiClient.GetAsync("Employee").Result;
Line 18: empList = response.Content.ReadAsAsync<IEnumerable<mvcEmployeeModel>>().Result;
Line 19:
Line 20: return View(empList);
 

Attachment: webApi.zip

Answers (2)