I need to create a data class which used for JsonConvert. Most of the resource string which used to be converted are same except the following properties:
public class DataType
{
public DateTimeOffset CreateDate { get; set; }
public DateTimeOffset Create_Date { get; set; }
}
Because in the resource string there are 2 types : "create_date": "2021-01-15T18:43:13.061+0000", & "createdate": "2021-01-15T18:43:13.061+0000",
with the following JsonConvert:
JsonConvert.DeserializeObject<DataType>(resourceStr);
The output of one of the datetime property will be wrong value. Is there a good way to use one property to handle both of these two formats?