PHPackages                             rodrigonull/json-guard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. rodrigonull/json-guard

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

rodrigonull/json-guard
======================

A validator for JSON using json-schema.

0.5.1(9y ago)021MITPHPPHP &gt;=5.5.0

Since Apr 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/rodrigonull/json-guard)[ Packagist](https://packagist.org/packages/rodrigonull/json-guard)[ Docs](https://github.com/thephpleague/json-guard)[ RSS](/packages/rodrigonull-json-guard/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (5)Versions (10)Used By (0)

JSON Guard
==========

[](#json-guard)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/fba8d2c64ba4485ca781a1ee33f7615d1e74f675ba6e904746d222dce7e49b5a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7468657068706c65616775652f6a736f6e2d67756172642f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/thephpleague/json-guard)[![Coverage Status](https://camo.githubusercontent.com/fd4e04e26f220a53b90508ad3413e987cd14c427412375ca74d681c36a26d1d1/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7468657068706c65616775652f6a736f6e2d67756172642e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/json-guard/code-structure)[![Quality Score](https://camo.githubusercontent.com/0fa59e2a9377e496fdb6ac85a923bfa85617ee4a205ee9e8022faf783c5e39b9/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7468657068706c65616775652f6a736f6e2d67756172642e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/json-guard)[![Documentation](https://camo.githubusercontent.com/16ee0df28d58259503825d407ff718c07112b5f956409840668d1efc7ddce4ae/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f63732d4c61746573742d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](http://json-guard.thephpleague.com/)

This package is a validator for [JSON Schema](http://json-schema.org/). It fully supports draft 4 of the specification.

Notable Features:

- Passes the entire [draft 4 JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite).
- Fully supports remote references.
- Fully supports circular references.
- Unique error codes for every validation error.

Install
-------

[](#install)

### Via Composer

[](#via-composer)

```
composer require league/json-guard
```

Usage
-----

[](#usage)

Complete documentation is available [here](http://json-guard.thephpleague.com/).

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information about what has changed recently.

Testing
-------

[](#testing)

You need to run a web server while testing. A simple node server is in the tests directory.

```
$ node tests/server.js
```

Once the server is running, you can run the test suite.

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Stability
---------

[](#stability)

This package is pre 1.0 so anything can break at any time. That being said, breaking changes are typically released in the minor version (the x in 0.x.y).

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Matt Allan](https://github.com/thephpleague)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~25 days

Recently: every ~31 days

Total

10

Last Release

3500d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ed57465ca3304bbfde90f86796ee01e91ec862d234300b783253ba50273bbc3?d=identicon)[rodrigonull](/maintainers/rodrigonull)

---

Top Contributors

[![ribeiropaulor](https://avatars.githubusercontent.com/u/376830?v=4)](https://github.com/ribeiropaulor "ribeiropaulor (2 commits)")[![karion](https://avatars.githubusercontent.com/u/1007461?v=4)](https://github.com/karion "karion (2 commits)")[![duncan3dc](https://avatars.githubusercontent.com/u/546811?v=4)](https://github.com/duncan3dc "duncan3dc (1 commits)")[![msarca](https://avatars.githubusercontent.com/u/5808737?v=4)](https://github.com/msarca "msarca (1 commits)")[![rodnover55](https://avatars.githubusercontent.com/u/2125064?v=4)](https://github.com/rodnover55 "rodnover55 (1 commits)")[![leberknecht](https://avatars.githubusercontent.com/u/1165177?v=4)](https://github.com/leberknecht "leberknecht (1 commits)")[![gbirke](https://avatars.githubusercontent.com/u/223326?v=4)](https://github.com/gbirke "gbirke (1 commits)")

---

Tags

jsonschemavalidationjson-schemajson-schema.org

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/rodrigonull-json-guard/health.svg)

```
[![Health](https://phpackages.com/badges/rodrigonull-json-guard/health.svg)](https://phpackages.com/packages/rodrigonull-json-guard)
```

###  Alternatives

[opis/json-schema

Json Schema Validator for PHP

65141.2M263](/packages/opis-json-schema)[geraintluff/jsv4

A (coercive) JSON Schema v4 Validator for PHP

115461.4k4](/packages/geraintluff-jsv4)[romaricdrigon/metayaml

Using \[Yaml|Xml|json\] schemas files to validate \[Yaml|Xml|json\]

103311.2k8](/packages/romaricdrigon-metayaml)[evaisse/php-json-schema-generator

A JSON Schema Generator.

18310.5k1](/packages/evaisse-php-json-schema-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
