mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-05-31 11:00:41 +02:00
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:
@@ -67,7 +67,7 @@ public class JsonPathMatcher : IStringMatcher, IObjectMatcher
|
|||||||
var score = MatchScores.Mismatch;
|
var score = MatchScores.Mismatch;
|
||||||
Exception? exception = null;
|
Exception? exception = null;
|
||||||
|
|
||||||
if (input != null)
|
if (!string.IsNullOrWhiteSpace(input))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class JmesPathMatcher : IStringMatcher, IObjectMatcher
|
|||||||
var score = MatchScores.Mismatch;
|
var score = MatchScores.Mismatch;
|
||||||
Exception? exception = null;
|
Exception? exception = null;
|
||||||
|
|
||||||
if (input != null)
|
if (!string.IsNullOrWhiteSpace(input))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user