I am working with ASP.NET Core 2.0 in VS2017.
I am trying to deserialize some JSON that is returned in an HttpResponseMessage
but I am getting an \"Unab
When you call the non-generic method JsonConvert.DeserializeObject(jsonResult), you are asking Json.NET to deserialize the incoming JSON into some .Net type of its own choosing that is sufficient to capture the incoming JSON. What it in fact chooses is a LINQ to JSON JObject. Since this type is not implicitly or explicitly convertible to your FilesUploadedListResponse
type, you get the exception you see.
Since want to deserialize to a specific, known type, you should instead call the generic method JsonConvert.DeserializeObject<FilesUploadedListResponse>(jsonResult) which Deserializes the JSON to the specified .NET type like so:
string jsonResult = response.Content.ReadAsStringAsync().Result;
var fileUploadListResponse = JsonConvert.DeserializeObject<FilesUploadedListResponse>(jsonResult);