Package org.apache.johnzon.jsonschema
Class JsonSchemaValidator
- java.lang.Object
-
- org.apache.johnzon.jsonschema.JsonSchemaValidator
-
- All Implemented Interfaces:
AutoCloseable
,Function<jakarta.json.JsonValue,ValidationResult>
public class JsonSchemaValidator extends Object implements Function<jakarta.json.JsonValue,ValidationResult>, AutoCloseable
-
-
Field Summary
Fields Modifier and Type Field Description private static ValidationResult
SUCCESS
private Function<jakarta.json.JsonValue,Stream<ValidationResult.ValidationError>>
validationFunction
-
Constructor Summary
Constructors Constructor Description JsonSchemaValidator(Function<jakarta.json.JsonValue,Stream<ValidationResult.ValidationError>> validationFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValidationResult
apply(jakarta.json.JsonValue object)
void
close()
String
toString()
-
-
-
Field Detail
-
SUCCESS
private static final ValidationResult SUCCESS
-
validationFunction
private final Function<jakarta.json.JsonValue,Stream<ValidationResult.ValidationError>> validationFunction
-
-
Constructor Detail
-
JsonSchemaValidator
JsonSchemaValidator(Function<jakarta.json.JsonValue,Stream<ValidationResult.ValidationError>> validationFunction)
-
-
Method Detail
-
apply
public ValidationResult apply(jakarta.json.JsonValue object)
- Specified by:
apply
in interfaceFunction<jakarta.json.JsonValue,ValidationResult>
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
-