diff --git a/CryptoExchange.Net/Converters/SystemTextJson/SystemTextJsonMessageAccessor.cs b/CryptoExchange.Net/Converters/SystemTextJson/SystemTextJsonMessageAccessor.cs index 38ff922..6ec35b0 100644 --- a/CryptoExchange.Net/Converters/SystemTextJson/SystemTextJsonMessageAccessor.cs +++ b/CryptoExchange.Net/Converters/SystemTextJson/SystemTextJsonMessageAccessor.cs @@ -133,7 +133,20 @@ namespace CryptoExchange.Net.Converters.SystemTextJson } /// - public List? GetValues(MessagePath path) => throw new NotImplementedException(); + public List? GetValues(MessagePath path) + { + if (!IsJson) + throw new InvalidOperationException("Can't access json data on non-json message"); + + var value = GetPathNode(path); + if (value == null) + return default; + + if (value.Value.ValueKind != JsonValueKind.Array) + return default; + + return value.Value.Deserialize>()!; + } private JsonElement? GetPathNode(MessagePath path) {