diff --git a/src/WireMock.Net/Matchers/JSONPathMatcher.cs b/src/WireMock.Net/Matchers/JSONPathMatcher.cs index 21f78ea3..14eccf19 100644 --- a/src/WireMock.Net/Matchers/JSONPathMatcher.cs +++ b/src/WireMock.Net/Matchers/JSONPathMatcher.cs @@ -67,7 +67,7 @@ public class JsonPathMatcher : IStringMatcher, IObjectMatcher var score = MatchScores.Mismatch; Exception? exception = null; - if (input != null) + if (!string.IsNullOrWhiteSpace(input)) { try { diff --git a/src/WireMock.Net/Matchers/JmesPathMatcher.cs b/src/WireMock.Net/Matchers/JmesPathMatcher.cs index 83b88d19..884ba0ff 100644 --- a/src/WireMock.Net/Matchers/JmesPathMatcher.cs +++ b/src/WireMock.Net/Matchers/JmesPathMatcher.cs @@ -74,7 +74,7 @@ public class JmesPathMatcher : IStringMatcher, IObjectMatcher var score = MatchScores.Mismatch; Exception? exception = null; - if (input != null) + if (!string.IsNullOrWhiteSpace(input)) { try {