1.3k
Stars
59
Forks
1
Open issues
30
Contributors
AI Analysis
JSON Lint for PHP provides sophisticated JSON validation and parsing with detailed error messages, going beyond native json_decode() to catch syntax errors and report them clearly. It's specifically designed for developers and applications that need to validate user-supplied or external JSON data and provide actionable error feedback—not a general-purpose tool but rather a specialized utility for error handling and validation workflows.
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
PHP JSON parser with detailed error messages and validation flags for development use
seld/jsonlint is a PHP library that parses JSON and produces human-readable error messages when parsing fails, along with optional validation features like duplicate key detection and UTF-8 validation. It is primarily used by Composer and embedded in tools that need to surface JSON errors to end users. The library is mature, narrowly focused, and actively maintained but sees modest adoption outside its primary use case.
Created in 2011 as a PHP port of the JavaScript jsonlint library by Jordi Boggiano. It was built to address a practical pain point: native PHP json_decode() provides minimal error feedback. The library has remained relatively stable since inception, with incremental improvements and maintenance.
The project gained early adoption through Composer's dependency chain, which uses it as documented in the README. Growth has plateaued at modest levels (1,325 stars, 2 gained in last 7 days). This reflects its narrow, solved problem: it serves projects that already understand they need better error messages than json_decode() provides. No evidence of recent acceleration or decline.
Composer uses this library, as explicitly documented in README with a code example. This provides high-confidence real-world usage at scale within PHP tooling. Adoption beyond Composer not verified in README or metadata. Likely embedded in other build tools and PHP projects that bundle Composer.
Based on README, the library exposes a JsonParser class with lint() and parse() methods. It appears to use a custom parser (ported from JavaScript) rather than delegating to native PHP functions. Optional flags control behavior: duplicate key handling, comment allowance, associative array conversion, and UTF-8 validation. Likely uses exception-based error handling with structured exception objects (ParsingException, DuplicateKeyException, InvalidEncodingException).
Not documented in README. CI/CD badge present (GitHub Actions), suggesting automated testing exists, but test coverage percentage and suite scope are not disclosed.
Last push 2026-07-02 (6 days before analysis date). Active CI/CD. Project requires PHP 5.3+, which is very old; no mention of compatibility with modern PHP (8.x). Slow but consistent activity pattern suggests maintenance-mode operations rather than rapid development.
ADOPT IF: you need JSON parsing with detailed error messages for user-facing feedback in PHP, or you are integrating into a tool that must handle malformed JSON gracefully. AVOID IF: you need schema validation, are optimizing for parsing speed, or require modern PHP version guarantees. MONITOR IF: you use this transitively via Composer and want to track whether maintenance continues or if PHP version compatibility requirements change.
Independent dimensions
Mainstream potential
2/10
Technical importance
6/10
Adoption evidence
7/10
- Minimum PHP version (5.3+) is declared but compatibility with PHP 8.x+ not explicitly confirmed in README; risk of silent incompatibility in modern environments.
- Performance explicitly slower than json_decode(), limiting use cases to non-performance-critical paths.
- Adoption concentrated in Composer; if usage outside that ecosystem exists, it is not documented.
- Custom parser maintenance burden; any future JSON spec changes require manual implementation.
- Limited indication of community contribution or active issue triage; appears to be single-maintainer project.
Project will likely remain in stable, maintenance mode. Incremental improvements and bug fixes will continue, but no major feature expansion is anticipated. Adoption will remain tied to Composer and tools that depend on Composer. Risk of gradual obsolescence if PHP ecosystem shifts away from manual JSON handling (e.g., toward type-safe serialization frameworks).
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Language
- PHP
- License
- MIT
- Last updated
- 1w ago
- Created
- 177mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
No open issues — clean slate.
Open pull requests
Top contributors
Recent releases
Similar repos
jsonrainbow/json-schema
A PHP library implementing JSON Schema validation with support for Draft-3,...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
1.3k | +2 | PHP | 8/10 | 1w ago |
|
|
3.6k | — | PHP | 7/10 | 1w ago |
|
|
12.3k | — | JavaScript | 8/10 | 1w ago |
|
|
3.7k | — | JavaScript | 7/10 | 4d ago |
|
|
1.3k | — | JavaScript | 7/10 | 3w ago |
|
|
1.1k | — | PHP | 7/10 | 2mo ago |
More comprehensive schema validation; seld/jsonlint focuses narrowly on parsing and error messages, not schema validation.
JavaScript-based UI component; seld/jsonlint is a PHP backend parser. Different category and purpose.
Linting across JavaScript; seld/jsonlint is JSON-specific parsing. Different languages and scope.
PHP built-in; seld/jsonlint provides richer error messages and validation flags at the cost of performance, as README acknowledges.
Framework-specific validation; seld/jsonlint is framework-agnostic and handles parsing only.