1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-21 13:23:07 +00:00

Added fallback for unparsable value in System.Text.Json NumberStringConverter

This commit is contained in:
Jkorf
2024-10-09 15:42:11 +02:00
parent 71ee263683
commit 168dabc11f
@@ -23,8 +23,15 @@ namespace CryptoExchange.Net.Converters.SystemTextJson
return reader.GetDecimal().ToString(); return reader.GetDecimal().ToString();
} }
try
{
return reader.GetString(); return reader.GetString();
} }
catch (Exception)
{
return null;
}
}
/// <inheritdoc /> /// <inheritdoc />
public override void Write(Utf8JsonWriter writer, string? value, JsonSerializerOptions options) public override void Write(Utf8JsonWriter writer, string? value, JsonSerializerOptions options)