public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { if (reader.Value == null) { return(null); } if (reader.Value is string valueS && long.TryParse(valueS, out var valueSl)) { return(UnixTime.ConvertToTimeFromMilliseconds(valueSl / 1000)); } if (reader.Value is long valueL) { return(UnixTime.ConvertToTimeFromMilliseconds(valueL / 1000)); } return(null); }