1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-07 07:56:12 +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

View File

@ -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);