I am trying to deserialise the following JSON
{"serverTime":1613967667240}
into an object of the following class
public class ApiServerTime
{
[JsonPropertyName("serverTime")]
public DateTime ServerTime
{
get;
private set;
}
}
with the following command:
JsonSerializer.Deserialize<ApiServerTime>(jsonString);
but the resulting object contains the ServerTime == DateTime.MinValue
. What am I doing wrong?