Cleans validation syntax from JSON object keys.
This method recursively processes a JSON object and removes validation syntax markers (?, *, :rules) from all object keys. This is useful when AI models mistakenly include our validation syntax in their responses.
The expected type of the cleaned data
The JSON data to clean
A new object with cleaned keys, typed as T
Validates an object against a template with validation rules.
The data object to validate
The template object with validation rules
The current path in the object hierarchy (used internally)
ValidationResult with Success flag and any validation errors
Validates an object against a JSON schema string. Convenience method that parses the schema and validates.
The data to validate
JSON string containing the validation schema
ValidationResult with Success flag and any validation errors
Lightweight JSON validator with flexible validation rules.
Example