mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-22 09:09:02 +01:00
fix jsonpath matcher (#311)
This commit is contained in:
@@ -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