mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-11-15 21:32:40 +01:00
fix jsonpath matcher (#311)
This commit is contained in:
1 parent
7789f94737
commit
87534c35f5
1 file changed
+1
-4
@@ -93,10 +93,7 @@ namespace WireMock.Matchers
|
||||
|
||||
private double IsMatch(JToken jtoken)
|
||||
{
|
||||
// Wrap in array if needed
|
||||
JToken tokenOrArray = jtoken is JArray ? jtoken : new JArray(jtoken);
|
||||
|
||||
return MatchScores.ToScore(_patterns.Select(pattern => tokenOrArray.SelectToken(pattern) != null));
|
||||
return MatchScores.ToScore(_patterns.Select(pattern => jtoken.SelectToken(pattern) != null));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user