mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-07 16:06:15 +00:00
Added fallback for unparsable value in System.Text.Json NumberStringConverter
This commit is contained in:
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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user