PHPackages                             hasbridge/json-schema-validator - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. hasbridge/json-schema-validator

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

hasbridge/json-schema-validator
===============================

PHP 5.3 implementation of json schema validation

0.2.0(14y ago)123456.3k—1.3%32[5 PRs](https://github.com/hasbridge/php-json-schema/pulls)2MITPHPPHP &gt;=5.3.2

Since Jan 24Pushed 9y ago17 watchersCompare

[ Source](https://github.com/hasbridge/php-json-schema)[ Packagist](https://packagist.org/packages/hasbridge/json-schema-validator)[ Docs](https://github.com/hasbridge/php-json-schema)[ RSS](/packages/hasbridge-json-schema-validator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (2)

This library provides JSON schema validation using the schema found at . Note that it is not yet feature complete, but does support basic validation. The JSON schema draft can be found at

Requirements
------------

[](#requirements)

- PHP 5.3 or greater (requires namespace and closure support)

Usage
-----

[](#usage)

```
$someJson = '{"foo":"bar"}';
$jsonObject = json_decode($someJson);

$validator = new JsonValidator('/path/to/yourschema.json');

$validator->validate($jsonObject);

```

Supported Types
---------------

[](#supported-types)

Types may be defined as either a single string type name, or an array of allowable type names.

- string
- number
- integer
- boolean
- object
- array
- null
- any

Supported Definitions
---------------------

[](#supported-definitions)

Not all definitions are yet supported, but here is a list of those which are:

- properties (object)
- additionalProperties (object)
- required (all)
- pattern (string)
- minLength (string)
- maxLength (string)
- format (string, number, integer)
- minimum (number, integer)
- maximum (number, integer)
- exclusiveMinimum (number, integer)
- exclusiveMaximum (number, integer)
- divisibleBy (number, integer)
- enum (array)
- minItems (array)
- maxItems (array)
- uniqueItems (array)
- items (array)
- disallow (all)

The following definitions are not yet supported:

- patternProperties
- dependencies
- extends
- id
- $ref
- $schema

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity51

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.7% of commits — single point of failure

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 ~33 days

Total

2

Last Release

5194d ago

### Community

Maintainers

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

---

Top Contributors

[![hasbridge](https://avatars.githubusercontent.com/u/647090?v=4)](https://github.com/hasbridge "hasbridge (26 commits)")[![czhang-ck](https://avatars.githubusercontent.com/u/135862829?v=4)](https://github.com/czhang-ck "czhang-ck (1 commits)")[![mtdowling](https://avatars.githubusercontent.com/u/190930?v=4)](https://github.com/mtdowling "mtdowling (1 commits)")[![slopjong](https://avatars.githubusercontent.com/u/456443?v=4)](https://github.com/slopjong "slopjong (1 commits)")

---

Tags

jsonschema

### Embed Badge

![Health badge](/badges/hasbridge-json-schema-validator/health.svg)

```
[![Health](https://phpackages.com/badges/hasbridge-json-schema-validator/health.svg)](https://phpackages.com/packages/hasbridge-json-schema-validator)
```

###  Alternatives

[justinrainbow/json-schema

A library to validate a json schema.

3.6k316.9M612](/packages/justinrainbow-json-schema)[psx/schema

Parse and generate data schema formats

57238.7k18](/packages/psx-schema)[open-code-modeling/json-schema-to-php

Parses JSON schema files and provides an API to easily generate code from JSON schema.

111.0k2](/packages/open-code-modeling-json-schema-to-php)

PHPackages © 2026

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