Skip to content

Commit e9862b3

Browse files
committed
fix
1 parent c1226a8 commit e9862b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WireMock.Net/Matchers/AbstractJsonPartialMatcher.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected override bool IsMatch(JToken value, JToken? input)
8282
case JTokenType.Object:
8383
var nestedValues = value.ToObject<Dictionary<string, JToken>>();
8484
return nestedValues?.Any() != true ||
85-
nestedValues.All(pair => IsMatch(pair.Value, input.SelectToken(pair.Key)));
85+
nestedValues.All(pair => IsMatch(pair.Value, input.SelectToken(pair.Key) ?? input[pair.Key])); // First try to select based on JPath expression, else just get the value.
8686

8787
case JTokenType.Array:
8888
var valuesArray = value.ToObject<JToken[]>();

0 commit comments

Comments
 (0)