fix(work): 修复部分场景下无法反序列化空字符串字段为数值类型的问题

This commit is contained in:
Fu Diwei
2022-03-10 13:33:45 +08:00
parent 07e98d57e3
commit da4c1f15d7
3 changed files with 47 additions and 6 deletions

View File

@@ -77,6 +77,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("sptime")]
[System.Text.Json.Serialization.JsonPropertyName("sptime")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualNullableLongConverter))]
public long? ApproveTimestamp { get; set; }
/// <summary>
@@ -258,8 +259,8 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("s_timestamp")]
[System.Text.Json.Serialization.JsonPropertyName("s_timestamp")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long Timestamp { get; set; }
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualNullableLongConverter))]
public long? Timestamp { get; set; }
}
public class SelectorControlValue
@@ -498,7 +499,8 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("time")]
[System.Text.Json.Serialization.JsonPropertyName("time")]
public long Timestamp { get; set; }
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualNullableLongConverter))]
public long? Timestamp { get; set; }
}
public class RelatedApprovalControlValue
@@ -594,7 +596,8 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("time")]
[System.Text.Json.Serialization.JsonPropertyName("time")]
public long Timestamp { get; set; }
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualNullableLongConverter))]
public long? Timestamp { get; set; }
}
}