PHPackages                             activerules/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. activerules/json-guard

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

activerules/json-guard
======================

A validator for JSON using json-schema.

1.0.4(8y ago)0451MITPHPPHP &gt;=5.6.0

Since Apr 15Pushed 8y ago1 watchersCompare

[ Source](https://github.com/ActiveRules/json-guard)[ Packagist](https://packagist.org/packages/activerules/json-guard)[ Docs](https://github.com/activerules/json-guard)[ RSS](/packages/activerules-json-guard/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (6)Versions (19)Used By (0)

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

[](#json-guard)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/dd7ce5114ef9d62e3c16059925476b23b1ba37da4f1e47e52877f0cf18f6057d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f61637469766572756c65732f6a736f6e2d67756172642f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/activerules/json-guard)[![Coverage Status](https://camo.githubusercontent.com/3005435130973670ee44ca1edb6fd03c4940a30437f81abfe155cb76215b99d2/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f61637469766572756c65732f6a736f6e2d67756172642e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/activerules/json-guard/code-structure)[![Quality Score](https://camo.githubusercontent.com/432b01ea63a385fa58ebdf9ebd3be607eba5e457442acd8c4065ce2d9ec1c6df/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f61637469766572756c65732f6a736f6e2d67756172642e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/activerules/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 customizable with custom rule sets.
- Helpful error messages with JSON Pointers.

Install
-------

[](#install)

### Via Composer

[](#via-composer)

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

Usage
-----

[](#usage)

Complete documentation is available [here](http://json-guard.activerules.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.

```
$ composer test-server
```

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

```
$ composer test
```

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

[](#contributing)

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

Security
--------

[](#security)

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

Credits
-------

[](#credits)

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

License
-------

[](#license)

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

Sponsored By:
-------------

[](#sponsored-by)

[UltriNet](http://www.ultri.net)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor4

4 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 ~34 days

Recently: every ~52 days

Total

18

Last Release

3090d ago

Major Versions

0.5.2 → 1.0.0-alpha2017-04-24

PHP version history (2 changes)v0.1.0PHP &gt;=5.5.0

1.0.0-alphaPHP &gt;=5.6.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/ebdbe4d0451d5b30c19c1eb4373de5946fb5c04511f7f45f441824126284b061?d=identicon)[bwinkers](/maintainers/bwinkers)

---

Top Contributors

[![bwinkers](https://avatars.githubusercontent.com/u/4514677?v=4)](https://github.com/bwinkers "bwinkers (4 commits)")[![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 (2 commits)")[![marcioAlmada](https://avatars.githubusercontent.com/u/227395?v=4)](https://github.com/marcioAlmada "marcioAlmada (1 commits)")[![msarca](https://avatars.githubusercontent.com/u/5808737?v=4)](https://github.com/msarca "msarca (1 commits)")[![Orkin](https://avatars.githubusercontent.com/u/1061903?v=4)](https://github.com/Orkin "Orkin (1 commits)")[![peterpostmann](https://avatars.githubusercontent.com/u/9541377?v=4)](https://github.com/peterpostmann "peterpostmann (1 commits)")[![rodnover55](https://avatars.githubusercontent.com/u/2125064?v=4)](https://github.com/rodnover55 "rodnover55 (1 commits)")[![aejnsn](https://avatars.githubusercontent.com/u/5347897?v=4)](https://github.com/aejnsn "aejnsn (1 commits)")[![ZeljkaBlazek](https://avatars.githubusercontent.com/u/32762399?v=4)](https://github.com/ZeljkaBlazek "ZeljkaBlazek (1 commits)")[![CaporalDead](https://avatars.githubusercontent.com/u/1705597?v=4)](https://github.com/CaporalDead "CaporalDead (1 commits)")[![gbirke](https://avatars.githubusercontent.com/u/223326?v=4)](https://github.com/gbirke "gbirke (1 commits)")[![leberknecht](https://avatars.githubusercontent.com/u/1165177?v=4)](https://github.com/leberknecht "leberknecht (1 commits)")

---

Tags

jsonschemavalidationjson-schemajson-schema.org

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[opis/json-schema

Json Schema Validator for PHP

64236.9M186](/packages/opis-json-schema)[geraintluff/jsv4

A (coercive) JSON Schema v4 Validator for PHP

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

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

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

A JSON Schema Generator.

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

PHPackages © 2026

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