mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-07 16:06:15 +00:00
Added support for object deserialization in SystemTextJsonMessageAccessor.GetValue<T>
This commit is contained in:
parent
b5893c3b60
commit
39bf7fe9b9
@ -126,7 +126,14 @@ namespace CryptoExchange.Net.Converters.SystemTextJson
|
||||
return default;
|
||||
|
||||
if (value.Value.ValueKind == JsonValueKind.Object || value.Value.ValueKind == JsonValueKind.Array)
|
||||
{
|
||||
try
|
||||
{
|
||||
return value.Value.Deserialize<T>(_serializerOptions);
|
||||
}
|
||||
catch { }
|
||||
return default;
|
||||
}
|
||||
|
||||
if (typeof(T) == typeof(string))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user