PHPackages                             robotdance/php-json-schema - 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. robotdance/php-json-schema

Abandoned → php-json-schemaLibrary[Parsing &amp; Serialization](/categories/parsing)

robotdance/php-json-schema
==========================

A library to validate a json schema.

v2.1.1(10y ago)1169MITPHPPHP &gt;=5.3.3

Since Jan 3Pushed 10y ago1 watchersCompare

[ Source](https://github.com/robotdance/php-json-schema)[ Packagist](https://packagist.org/packages/robotdance/php-json-schema)[ Docs](https://github.com/robotdance/php-json-schema)[ RSS](/packages/robotdance-php-json-schema/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (5)Versions (30)Used By (0)

JSON Schema for PHP
===================

[](#json-schema-for-php)

[![Code Climate](https://camo.githubusercontent.com/022514cd5df11998241597971541534fa1766165c280af52b94973dfe0e93e4c/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f726f626f7464616e63652f7068702d6a736f6e2d736368656d612f6261646765732f6770612e737667)](https://codeclimate.com/github/robotdance/php-json-schema)[![Test Coverage](https://camo.githubusercontent.com/2956b3afe2360f50edfebdad34509ebacc5addad9a2809d9ea41ca4229901ae3/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f726f626f7464616e63652f7068702d6a736f6e2d736368656d612f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/robotdance/php-json-schema/coverage)[![Issue Count](https://camo.githubusercontent.com/086499ed77228714be2eb1e769d9f9372750354183a4670a41c46c5bd6d51774/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f726f626f7464616e63652f7068702d6a736f6e2d736368656d612f6261646765732f69737375655f636f756e742e737667)](https://codeclimate.com/github/robotdance/php-json-schema)[![Build Status](https://camo.githubusercontent.com/ba56ca21ab59e51c3b990a9329fc0e10213951010d824f5d51c85861d930d975/68747470733a2f2f7472617669732d63692e6f72672f726f626f7464616e63652f7068702d6a736f6e2d736368656d612e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/robotdance/php-json-schema)

A PHP [json-schema](http://json-schema.org/) implementation for validating JSON data agains a JSON Schema definition.

Originally forked from [justinrainbow/json-schema](https://github.com/justinrainbow/json-schema).

In addition to the original, I18n was added for the validation messages, with initial support for en-US and pt-BR. Currently the branch "add-i18n" will be kept in sync with the forked repository, and the master branch will follow its own way.

Installation
------------

[](#installation)

PHP-Json-Schema is available as a [`Composer`](https://github.com/composer/composer) package, and use it also as its dependency manager. So you will need a composer.json in your project root, requiring php-json-schema:

```
  ...
  "require": {
    "robotdance/php-json-schema": "latest stable version"
  }
  ...
```

So after updating your composer file, simply update composer.

```
$ php composer.phar update
$ composer update

```

The way you update with composer will depend on how you installed composer.

Usage
-----

[](#usage)

```
