1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-11 16:32:57 +00:00

Add check for null string to decimal converter

This commit is contained in:
JKorf
2024-08-05 21:45:01 +02:00
parent e3fece41f3
commit 7be75f72a7
@@ -19,7 +19,7 @@ namespace CryptoExchange.Net.Converters.SystemTextJson
if (reader.TokenType == JsonTokenType.String)
{
var value = reader.GetString();
if (string.IsNullOrEmpty(value))
if (string.IsNullOrEmpty(value) || string.Equals("null", value))
return null;
return decimal.Parse(value, NumberStyles.Float, CultureInfo.InvariantCulture);