An open API service indexing awesome lists of open source software.

https://github.com/texthtml/json-validator

Validate json data with json-schema
https://github.com/texthtml/json-validator

Last synced: 5 months ago
JSON representation

Validate json data with json-schema

Awesome Lists containing this project

README

          

# json-validator

```php
$validator = \TH\JsonValidator\JsonValidator::create();
$data = json_decode($dataJsonString);
$validator->validate($data, (object)["\$ref" => "file://" . __DIR__."/data-schema.json"]));

$decoder = \TH\JsonValidator\JsonDecoder::create();
$data = $decoder->decode($dataJsonString, (object)["\$ref" => "file://" . __DIR__."/data-schema.json"]));
```