<PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> for Asp.Net Core 2.1
The main result you failed to deserialize is you didn't return json object correctly.
You could create a combind object which contains ListTimesheetsTmp
and ErrorTmp
. And deserialize with the same Obj.
public class Obj
{
public List<ListTimesheets> listTimesheetsTmp;
public Errors errorTmp;
public Obj(List<ListTimesheets> listTimesheetsTmp, Errors errorTmp)
{
this.listTimesheetsTmp = listTimesheetsTmp;
this.errorTmp = errorTmp;
}
}
Test