@Override
	public AssertionResult getResult(SampleResult samplerResult) 
	{
		AssertionResult result = new AssertionResult(getName());
		byte[] responseData = samplerResult.getResponseData();
		if (responseData.length == 0) {
			return result.setResultForNull();
		}
	
		if (isJsonValidation())
		{
			try 
			{
				if (checkJSONPathWithValidation(new String(responseData,"UTF-8"), getJsonPath(), getExpectedValue())) {
					result.setFailure(false);
					result.setFailureMessage("");
				}
			} 
			catch (ParseException e)
			{
				result.setFailure(true);
				result.setFailureMessage(e.getClass().toString() + " - " + e.getMessage());
			}
			catch (Exception e) 
			{
				result.setFailure(true);
				result.setFailureMessage(e.getMessage());
			}
		}
		
		if (!isJsonValidation())
		{
			try 
			{
				if (checkJSONPathWithoutValidation(new String(responseData), getJsonPath())) {
					result.setFailure(false);
					result.setFailureMessage("");
				}		
			} 
			catch (ParseException e) 
			{
				result.setFailure(true);
				result.setFailureMessage(e.getClass().toString() + " - " + e.getMessage());
			} 
			catch (Exception e) 
			{
				result.setFailure(true);
				result.setFailureMessage(e.getMessage());
			}
		}	
		
		return result;
	}