Fix JsonMatcher and JsonPathMatcher

This commit is contained in:
Stef Heyenrath
2018-08-07 19:27:10 +02:00
parent f13b829c00
commit 4f7259d27a
5 changed files with 46 additions and 14 deletions

View File

@@ -63,7 +63,9 @@ namespace WireMock.Matchers
public double IsMatch(object input)
{
double match = MatchScores.Mismatch;
if (input != null)
// When input is null or byte[], return Mismatch.
if (input != null && !(input is byte[]))
{
try
{

View File

@@ -65,7 +65,9 @@ namespace WireMock.Matchers
public double IsMatch(object input)
{
bool match = false;
if (input != null)
// When input is null or byte[], return Mismatch.
if (input != null && !(input is byte[]))
{
try
{