1
0
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:
Jkorf 2024-11-06 11:20:37 +01:00
parent b5893c3b60
commit 39bf7fe9b9

View File

@ -126,7 +126,14 @@ namespace CryptoExchange.Net.Converters.SystemTextJson
return default; return default;
if (value.Value.ValueKind == JsonValueKind.Object || value.Value.ValueKind == JsonValueKind.Array) if (value.Value.ValueKind == JsonValueKind.Object || value.Value.ValueKind == JsonValueKind.Array)
{
try
{
return value.Value.Deserialize<T>(_serializerOptions);
}
catch { }
return default; return default;
}
if (typeof(T) == typeof(string)) if (typeof(T) == typeof(string))
{ {