public class DefaultJsonSchemaValidator extends Object implements JsonSchemaValidator
JsonSchemaValidator interface. This class
provides methods to validate structured content against a JSON schema. It uses the
NetworkNT JSON Schema Validator library for validation.JsonSchemaValidator.ValidationResponse| Constructor and Description |
|---|
DefaultJsonSchemaValidator() |
DefaultJsonSchemaValidator(com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache()
Clears the schema cache.
|
protected String |
generateCacheKey(Map<String,Object> schema)
Generates a cache key for the given schema map.
|
int |
getCacheSize()
Returns the current size of the schema cache.
|
JsonSchemaValidator.ValidationResponse |
validate(Map<String,Object> schema,
Map<String,Object> structuredContent)
Validates the structured content against the provided JSON schema.
|
public DefaultJsonSchemaValidator()
public DefaultJsonSchemaValidator(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public JsonSchemaValidator.ValidationResponse validate(Map<String,Object> schema, Map<String,Object> structuredContent)
JsonSchemaValidatorvalidate in interface JsonSchemaValidatorschema - The JSON schema to validate against.structuredContent - The structured content to validate.protected String generateCacheKey(Map<String,Object> schema)
schema - the schema mappublic void clearCache()
public int getCacheSize()
Copyright © 2025. All rights reserved.