class JsonUtils {

    public static String jsonSchemaValidation(String jsonStr, String jsonSchemaPath) throws ValidationException {
        try {
            logger.debug("JSON document to be validated: {}", jsonStr);
            JsonNode document = JsonLoader.fromString(jsonStr);
            JsonNode schema = JsonLoader.fromPath(jsonSchemaPath);

            JsonSchemaFactory factory = JsonSchemaFactory.byDefault();
            JsonValidator validator = factory.getValidator();

            ProcessingReport report = validator.validate(schema, document);
            logger.debug("JSON schema validation report: {}", report);
            return report.toString();
        } catch (IOException e) {
            logger.debug("IOException performing JSON schema validation on document:", e);
            throw new ValidationException(e.getMessage());
        } catch (ProcessingException e) {
            logger.debug("ProcessingException performing JSON schema validation on document:", e);
            throw new ValidationException(e.getMessage());
        }
    }

}