mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-20 21:02:55 +00:00
Added support for object deserialization in SystemTextJsonMessageAccessor.GetValue<T>
This commit is contained in:
@@ -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))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user