Class JsonSchemaValidationUtil


  • public class JsonSchemaValidationUtil
    extends Object
    Author:
    Carles Arnal
    • Constructor Detail

      • JsonSchemaValidationUtil

        public JsonSchemaValidationUtil()
    • Method Detail

      • validateDataWithSchema

        protected static void validateDataWithSchema​(ParsedSchema<com.networknt.schema.JsonSchema> schema,
                                                     byte[] data,
                                                     com.fasterxml.jackson.databind.ObjectMapper mapper)
                                              throws IOException
        Parameters:
        schema - the schema to test the data.
        data - the data to test.
        mapper - the object mapper to be used to read the data.
        Throws:
        IOException - In case of validation errors, a IO exception is thrown.