Seldaek

Seldaek/jsonlint

PHP MIT Dev Tools

JSON Lint for PHP

1.3k stars
59 forks
recent
GitHub +2 / week

1.3k

Stars

59

Forks

1

Open issues

30

Contributors

1.12.1 12 Jun 2026

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.

Dev Tools Library Discovery value: 5/10
Documentation 8/10
Activity 9/10
Community 7/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 8/10

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

json-validation error-reporting php-parser utf8-validation developer-tools
Actively maintained Well documented MIT licensed Niche/specialized use case Beginner friendly Production ready
Deep Analysis · Based on README and public signals
2d ago

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.

Origin

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.

Growth

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.

In production

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.

Code analysis
Architecture

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).

Tests

Not documented in README. CI/CD badge present (GitHub Actions), suggesting automated testing exists, but test coverage percentage and suite scope are not disclosed.

Maintenance

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.

Honest verdict

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

Risks
  • 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.
Prediction

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).

0 found this helpful

Newsletter

Get analyses like this every Monday

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

Languages

PHP
100%

Information

Language
PHP
License
MIT
Last updated
1w ago
Created
177mo 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…

Open issues

No open issues — clean slate.

Similar repos

jsonrainbow

jsonrainbow/json-schema

A PHP library implementing JSON Schema validation with support for Draft-3,...

3.6k PHP Dev Tools
josdejong

josdejong/jsoneditor

JSON Editor is a web-based tool for viewing, editing, formatting, and...

12.3k JavaScript Dev Tools
jslint-org

jslint-org/jslint

JSLint is Douglas Crockford's JavaScript static analysis and code quality tool...

3.7k JavaScript Dev Tools
publint

publint/publint

Publint is a linter that identifies packaging errors in JavaScript/TypeScript...

1.3k JavaScript Dev Tools
proengsoft

proengsoft/laravel-jsvalidation

Laravel Javascript Validation automatically generates client-side form...

1.1k PHP Web Dev
vs. alternatives
jsonrainbow/json-schema

More comprehensive schema validation; seld/jsonlint focuses narrowly on parsing and error messages, not schema validation.

josdejong/jsoneditor

JavaScript-based UI component; seld/jsonlint is a PHP backend parser. Different category and purpose.

jslint-org/jslint

Linting across JavaScript; seld/jsonlint is JSON-specific parsing. Different languages and scope.

Native json_decode()

PHP built-in; seld/jsonlint provides richer error messages and validation flags at the cost of performance, as README acknowledges.

proengsoft/laravel-jsvalidation

Framework-specific validation; seld/jsonlint is framework-agnostic and handles parsing only.