I'm trying to deserialize a Json response into a class that looks like this:
jiraResponseMessage = JsonSerializer.Deserialize<InternalJiraIssuesResponse>(responseString);
When running the code, I keep getting the following error:
The JSON value could not be converted to System.DateTime. Path: $.issues[0].changelog.histories[0].created | LineNumber: 0 | BytePositionInLine: 1451.
The error is being thrown when trying to deserialize this part :
"created":"2021-09-16T09:12:55.427-0700",
Can anyone help me to figure out how to get the Json to be deserialized for this?
This is the class I have for deserializing:
public class History
{
public string id { get; set; }
public Author author { get; set; }
public DateTime created { get; set; }
public Item[] items { get; set; }
}
Even when changing "created" to a string or object, it still chokes.
Any ideas on how I can resolve this?