use of org.n52.svalbard.decode.json.JSONDecodingException in project arctic-sea by 52North.
the class JSONValidator method validateAndThrow.
public void validateAndThrow(JsonNode instance, String schema) throws DecodingException {
ProcessingReport report = JSONValidator.getInstance().validate(instance, schema);
if (!report.isSuccess()) {
String message = encode(report, instance);
LOG.info("Invalid JSON instance:\n{}", message);
throw new JSONDecodingException(message);
}
}
Aggregations