changed null check in JSONPathMatcher and JmesPathMatcher to ensure that the body is not an empty string (the json parse would throw an exception at this point) (#1278)

This commit is contained in:
jollyjoyce1995
2025-04-23 07:30:52 +02:00
committed by GitHub
parent 66a048a487
commit d9a7e80360
2 changed files with 2 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ public class JsonPathMatcher : IStringMatcher, IObjectMatcher
var score = MatchScores.Mismatch;
Exception? exception = null;
if (input != null)
if (!string.IsNullOrWhiteSpace(input))
{
try
{

View File

@@ -74,7 +74,7 @@ public class JmesPathMatcher : IStringMatcher, IObjectMatcher
var score = MatchScores.Mismatch;
Exception? exception = null;
if (input != null)
if (!string.IsNullOrWhiteSpace(input))
{
try
{