Package fr.gouv.vitam.common.json
Class JsonSchemaValidator
- java.lang.Object
-
- fr.gouv.vitam.common.json.JsonSchemaValidator
-
@Immutable public class JsonSchemaValidator extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JsonSchemaValidator
forBuiltInSchema(java.lang.String schemaFilename)
static JsonSchemaValidator
forUserSchema(java.lang.String schemaJsonAsString)
void
validateJson(com.fasterxml.jackson.databind.JsonNode jsonNode)
Validate a json with a schema
-
-
-
Method Detail
-
forBuiltInSchema
public static JsonSchemaValidator forBuiltInSchema(java.lang.String schemaFilename)
-
forUserSchema
public static JsonSchemaValidator forUserSchema(java.lang.String schemaJsonAsString) throws InvalidJsonSchemaException
- Throws:
InvalidJsonSchemaException
-
validateJson
public void validateJson(com.fasterxml.jackson.databind.JsonNode jsonNode) throws JsonSchemaValidationException
Validate a json with a schema- Throws:
JsonSchemaValidationException
-
-