jsonrainbow

jsonrainbow/json-schema

PHP MIT Dev Tools

JSON Schema for PHP

3.6k stars
369 forks
active
GitHub +2 / week

3.6k

Stars

369

Forks

12

Open issues

30

Contributors

6.10.0 16 Jun 2026

AI Analysis

A PHP library implementing JSON Schema validation with support for Draft-3, Draft-4, Draft-6, Draft-7, and Draft 2019-09 specifications. It enables developers to validate JSON structures against schemas and includes type coercion for HTTP data. This library serves the PHP ecosystem specifically and is best suited for server-side validation in PHP applications; developers using other languages or frameworks will need different implementations.

Dev Tools Library Discovery value: 3/10
Documentation 7/10
Activity 9/10
Community 8/10
Code quality 7/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 7/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

json-schema validation php data-validation schema-compliance
Actively maintained MIT licensed Niche/specialized use case Well documented Beginner friendly Production ready
Deep Analysis · Based on README and public signals
2d ago

Mature PHP JSON Schema validator with broad spec support and modest but stable adoption

json-schema is a PHP library that validates JSON data structures against JSON Schema specifications (Draft 3 through Draft 2019-09). Built and maintained since 2011, it serves PHP developers who need schema validation without external dependencies. Adoption appears concentrated in PHP web frameworks and APIs; real-world usage is difficult to quantify but Composer download metrics suggest consistent, modest-scale use. The project prioritizes spec compliance over aggressive feature expansion.

Origin

Created in 2011 by Justin Rainbow, this project emerged as PHP's primary JSON Schema validator when the specification was stabilizing. It has tracked multiple JSON Schema drafts over 15 years, maintaining backward compatibility while incrementally adding support for newer specifications. The Bowtie compliance testing integration (visible in README badges) suggests recent efforts to maintain spec alignment.

Growth

Growth appears linear and modest: 3,632 stars accumulated over 15 years suggests stable niche adoption rather than viral growth. The 2 stars gained in the last 7 days (as of 2026-07-08) is consistent with slow, mature-project trajectory. Last push on 2026-07-03 indicates active maintenance. Growth likely driven by PHP ecosystem inertia and lack of competing implementations rather than feature innovation.

In production

Adoption not verified through explicit case studies. Indirect signals: Composer package registry listing with 'Total Downloads' metric mentioned but values not provided in excerpt; stable star count over years suggests recurring installations. Presence in Packagist (standard PHP dependency hub) indicates some production use, but scale unknown. No public testimonials or enterprise user list visible.

Code analysis
Architecture

Based on README, the library uses a validator factory pattern with constraint-based validation logic (references Factory, Constraints). It supports schema references (inline and file-based), type coercion, and default value application. Likely implements recursive descent validation but actual implementation patterns cannot be verified from README alone.

Tests

CI/CD workflow badge present in README (GitHub Actions), but test coverage percentage not documented. README includes multiple code examples suggesting tested functionality, but comprehensive coverage metrics not verified.

Maintenance

Active maintenance confirmed: last commit 2026-07-03 (5 days before analysis date). CI pipeline operational. README references current Bowtie compliance reports and multiple JSON Schema drafts. No evidence of abandoned state; consistent low-velocity commits typical of stable, feature-complete libraries.

Honest verdict

ADOPT IF: you are building PHP applications that require JSON Schema validation (especially API input validation, configuration validation) and need broad Draft support without external service dependencies. Library is stable, actively maintained, and well-integrated into PHP package ecosystem. AVOID IF: you need cutting-edge JSON Schema features from the very latest drafts (2020-12 or later) — README indicates some newer draft features may be missing. Also avoid if you require TypeScript/Node.js or Python (use language-specific implementations instead). MONITOR IF: you rely on Draft 2019-09 or newer features — check Bowtie compliance badge regularly to confirm draft coverage matches your schema version.

Independent dimensions

Mainstream potential

3/10

Technical importance

6/10

Adoption evidence

4/10

Risks
  • Adoption scale unquantified: Composer download counts not provided; cannot verify production usage volume beyond inferred modest scale.
  • Incomplete newer draft support: README explicitly states 'Features of newer Drafts might not be supported'; projects using latest JSON Schema drafts may face compatibility gaps.
  • Limited maintenance bandwidth: 2 stars in 7 days and long creation-to-present span suggests small maintainer team; bug fixes and new draft support may lag community releases.
  • Language-specific ceiling: PHP ecosystem represents bounded addressable market; mainstream_potential inherently limited compared to polyglot tools.
  • Spec drift risk: JSON Schema specifications continue evolving (2020-12, 2024 drafts exist); library may fall behind if maintainer team capacity decreases.
Prediction

Project will likely remain stable but slow-growing, serving as the de facto PHP JSON Schema validator for the foreseeable future. Adoption curve will probably flatten rather than accelerate, as early adopters are already users. Maintenance will persist at current low-velocity pace. Unlikely to see major feature expansion unless new PHP use cases (e.g., async validation, performance-critical systems) create demand.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

PHP
99.2%
Shell
0.8%

Information

Language
PHP
License
MIT
Last updated
1w ago
Created
187mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

json-schema-org

json-schema-org/json-schema-spec

JSON Schema is a vocabulary and specification for validating, annotating, and...

5.1k JavaScript Dev Tools
python-jsonschema

python-jsonschema/jsonschema

jsonschema is a mature Python implementation of the JSON Schema specification,...

5k Python Dev Tools
voxpupuli

voxpupuli/json-schema

A Ruby library for validating JSON objects against JSON Schema specifications...

1.6k Ruby Dev Tools
spatie

spatie/schema-org

spatie/schema-org is a PHP library that provides a fluent builder for...

1.5k PHP Web Dev
Seldaek

Seldaek/jsonlint

JSON Lint for PHP provides sophisticated JSON validation and parsing with...

1.3k PHP Dev Tools
vs. alternatives
python-jsonschema (Python)

4,959 stars vs. 3,632; serves different language ecosystem. Python version likely larger due to Python's greater popularity in data validation contexts, but projects are not direct substitutes.

json-schema-org/json-schema-spec (Reference)

5,058 stars; this is the specification repository itself, not a validator implementation. json-schema provides the PHP implementation of this spec.

voxpupuli/json-schema (Ruby)

1,646 stars; Ruby ecosystem alternative. Lower adoption than PHP version, likely reflecting Ruby's smaller footprint for this use case.

spatie/schema-org (PHP)

1,500 stars; also PHP but focuses on Schema.org vocabularies rather than general JSON Schema validation. Different problem domain, not direct competitor.

Seldaek/jsonlint (PHP)

1,325 stars; validates JSON syntax, not structure against schemas. Complementary tool, not replacement.