mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-07 16:06:15 +00:00
Added check for datetime year 1 to be deserialized as null
This commit is contained in:
parent
1f31e4a9d7
commit
c614b7869c
@ -57,6 +57,7 @@ namespace CryptoExchange.Net.Converters.SystemTextJson
|
|||||||
var stringValue = reader.GetString();
|
var stringValue = reader.GetString();
|
||||||
if (string.IsNullOrWhiteSpace(stringValue)
|
if (string.IsNullOrWhiteSpace(stringValue)
|
||||||
|| stringValue == "-1"
|
|| stringValue == "-1"
|
||||||
|
|| stringValue == "0001-01-01T00:00:00Z"
|
||||||
|| double.TryParse(stringValue, out var doubleVal) && doubleVal == 0)
|
|| double.TryParse(stringValue, out var doubleVal) && doubleVal == 0)
|
||||||
{
|
{
|
||||||
return default;
|
return default;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user