A Ruby library for validating JSON objects against JSON Schema Draft 6 with legacy support for Drafts 1-4.
Ruby JSON Schema Validator is a Ruby library that validates JSON objects against JSON Schema specifications. It provides methods to check JSON data for structural and semantic correctness according to defined schemas, supporting drafts 1 through 6. The library solves the problem of ensuring JSON data integrity and compliance in Ruby applications.
Ruby developers building applications that consume or produce JSON data and need to validate its structure against schemas, such as API developers, data pipeline engineers, and integration specialists.
Developers choose this library for its comprehensive support of multiple JSON Schema drafts, flexible validation options, and extensibility through custom attributes and formats, all within a pure Ruby implementation.
Ruby JSON Schema Validator
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Validates against JSON Schema Drafts 1 through 6, with default support for Draft 6, ensuring compatibility with a wide range of schema versions as stated in the README.
Offers validate (boolean), validate! (exception), and fully_validate (error array) methods, catering to different error handling needs in Ruby applications.
Includes strict mode, fragment validation, schema validation, and custom format registration, providing fine-grained control over validation logic, as demonstrated in the Advanced Options section.
Allows extending schemas with custom attributes and registering custom format validators, enabling tailored validation rules, with examples provided in the README.
The 'format' attribute is only validated for specific values like date-time and URI, ignoring many other format types defined in JSON Schema specifications, as noted in the Notes section.
Explicitly does not handle any JSON hyperschema attributes, limiting its use for hypermedia-driven APIs and advanced schema features.
MultiJSON support is deprecated and will be removed in future versions, which may disrupt applications relying on it for JSON backend selection, as mentioned in the JSON Backends section.