- Full compliance with JSON Schema Draft 2019-09
- All core validation keywords
$recursiveRef/$recursiveAnchordynamic recursion
- Full compliance with JSON Schema Draft 2020-12
- All core validation keywords
prefixItemssupport for tuple validation$dynamicRef/$dynamicAnchordynamic scope resolution
-
type- All types: string, number, integer, boolean, object, array, null - Multiple types support
-
minLength- Minimum string length -
maxLength- Maximum string length -
pattern- Regular expression validation -
format- Format validation:- uri
- date
- time
- date-time
- ipv4
- ipv6
- uuid
- hostname
- idn-email
- iri
- iri-reference
- regex
-
minimum- Minimum value (inclusive) -
maximum- Maximum value (inclusive) -
exclusiveMinimum- Minimum value (exclusive) -
exclusiveMaximum- Maximum value (exclusive) -
multipleOf- Value must be multiple of
-
properties- Property schemas -
required- Required properties -
additionalProperties- Additional properties validation -
patternProperties- Pattern-based property schemas -
minProperties- Minimum number of properties -
maxProperties- Maximum number of properties -
propertyNames- Property name validation -
dependentRequired- Dependent required properties -
dependentSchemas- Dependent schemas -
unevaluatedProperties- Annotation-based, with full propagation through all applicators
-
items- Item schema validation -
prefixItems- Tuple validation (2020-12) -
additionalItems- Additional items in tuples (2019-09) -
minItems- Minimum array length -
maxItems- Maximum array length -
uniqueItems- Unique items constraint -
contains- Contains validation -
minContains- Minimum matching items -
maxContains- Maximum matching items -
unevaluatedItems- Annotation-based, with contains annotation (matching indices only)
-
allOf- Must match all schemas -
anyOf- Must match at least one schema -
oneOf- Must match exactly one schema -
not- Must not match schema
-
if- Conditional schema -
then- Schema to apply if condition matches -
else- Schema to apply if condition doesn't match
-
const- Constant value validation -
enum- Enumeration validation
-
true- Accepts any instance -
false- Rejects any instance
-
$ref— JSON Pointer and named anchor resolution, respects$idresource boundaries -
$ref— External schema loading via pluggableschemaLoadercallback -
$anchor— Named anchors within a schema resource -
$dynamicAnchor/$dynamicRef— Draft 2020-12 dynamic scope resolution -
$recursiveAnchor/$recursiveRef— Draft 2019-09 dynamic recursion -
$id— Schema resource boundaries with RFC 3986 relative URI resolution -
$defs/definitions— Schema definition storage - Sibling keywords evaluated alongside
$ref(Draft 2019-09+ behaviour) - Percent-decoding of URI fragments (RFC 6901 §6)
Test Suite: json-schema-org/JSON-Schema-Test-Suite
| Metric | Value |
|---|---|
| Total tests | 2,653 |
| Passing | 2,653 ✅ |
| Failing | 0 |
| Pass rate | 100% |
Total test cases: 35+
-
Type Validation (8 tests)
- String, integer, number, boolean, null, object, array types
- Multiple types
-
String Validation (6 tests)
- minLength, maxLength, pattern
- email, date-time, uuid formats
-
Number Validation (5 tests)
- minimum, maximum
- exclusiveMinimum, exclusiveMaximum
- multipleOf
-
Object Validation (10 tests)
- properties, required
- additionalProperties (boolean and schema)
- patternProperties
- minProperties, maxProperties
- propertyNames
- dependentRequired, dependentSchemas
-
Array Validation (7 tests)
- items (single and tuple)
- minItems, maxItems
- uniqueItems
- contains, minContains, maxContains
-
Const and Enum (2 tests)
-
Combining Schemas (4 tests)
- allOf, anyOf, oneOf, not
-
Conditional Schemas (1 test)
- if-then-else
-
Boolean Schemas (2 tests)
-
Schema Validation (2 tests)
Total test cases: 40+
All Draft 2019-09 tests plus:
- prefixItems validation
- Enhanced format validation
- Real-world schemas (user profiles, API responses)
- Complex combinations
Total test cases: 50+
-
Empty and Null Values (6 tests)
- Empty strings, arrays, objects
- Null values and combinations
-
Boundary Values (5 tests)
- Zero-length strings
- Very large numbers
- Exact boundary validation
- Exclusive boundaries
-
Deeply Nested Structures (3 tests)
- Nested objects
- Nested arrays
- Nested allOf
-
Pattern and Regex (4 tests)
- Empty patterns
- Complex regex
- Special characters
- Overlapping patterns
-
Numeric Precision (3 tests)
- Floating point multipleOf
- Very small values
- Integer vs number distinction
-
Circular References (1 test)
- Recursive schema definitions
-
Special String Formats (4 tests)
- Various email formats
- IPv4 addresses
- UUID formats
- Date and time formats
-
Error Messages (2 tests)
- Meaningful error messages
- Path inclusion in errors
-
Thread Safety (6 tests)
- Concurrent validations (100 concurrent)
- Different schemas concurrently
- Validation failures under concurrency
- Concurrent schema validation (50 schemas)
- High concurrency (1000 concurrent)
- State isolation
-
Schema Version Detection (3 tests)
- Draft 2019-09 detection
- Draft 2020-12 detection
- Default version handling
-
Large Data Sets (2 tests)
- Large arrays (10,000 items)
- Large objects (1,000 properties)
- Stateless design - No mutable shared state between validations
- Immutable validator -
JsonValidatorinstance can be shared freely across threads - Concurrent validation - Tested with up to 1,000 concurrent operations
- Configurable depth limit - Protects against stack overflow in untrusted schemas
- Efficient validation - Single-pass validation where possible
- Large data support - Tested with 10,000+ element arrays
- Memory efficient - No unnecessary copying of data
- Concurrent performance - Linear scaling with multiple cores
- Detailed error messages - Clear description of validation failures
- Path tracking - Full JSON path to error location
- Keyword identification - Which keyword failed
- Multiple errors - Reports all validation errors, not just first one
- Type-safe - Leverages Kotlin's type system
- Synchronous - Simple blocking API, no coroutines required
- Idiomatic Kotlin - Follows Kotlin conventions
- Easy to use - Simple, intuitive API
- Thread-safe - Single
JsonValidatorinstance safe for concurrent use
- 100% official JSON Schema test suite pass rate (2,653 / 2,653)
- Comprehensive unit tests (179+ additional test cases)
- Thread-safe implementation
- Configurable recursion depth protection
- Performance tested with large datasets
- Detailed documentation
- Standard Gradle build
- Maven publishable
- Zero linter errors