diff --git a/src/Support.NewtonsoftJson/Converters/ExtractPropertyValueConverterFactory.cs b/src/Support.NewtonsoftJson/Converters/ExtractPropertyValueConverterFactory.cs index f65e9f3c8..936905b05 100644 --- a/src/Support.NewtonsoftJson/Converters/ExtractPropertyValueConverterFactory.cs +++ b/src/Support.NewtonsoftJson/Converters/ExtractPropertyValueConverterFactory.cs @@ -32,7 +32,7 @@ public bool TryConvert(JToken serialized, ITransformer defer, ITransformer recur } } - public IConverter? TryCreate(IGremlinQueryEnvironment environment) => typeof(JToken).IsAssignableFrom(typeof(TSource)) + public IConverter? TryCreate(IGremlinQueryEnvironment environment) => typeof(JToken).IsAssignableFrom(typeof(TSource)) && !(typeof(TTarget).IsGenericType && typeof(TTarget).GetGenericTypeDefinition() == typeof(KeyValuePair<,>)) ? (IConverter)(object)new ExtractPropertyValueConverter(environment) : default; }