Skip to content
forked from kherge/php.json

A library for simplifying JSON linting and validation.

License

Notifications You must be signed in to change notification settings

basilfx/php-json

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON

Build Status

A library for simplifying JSON linting and validation.

Summary

Uses the justinrainbow/json-schema and seld/jsonlint libraries to lint and validate JSON data. Also decodes JSON data as to only lint when an error is encountered, minimizing performance impact.

Installation

Add it to your list of Composer dependencies:

$ composer require herrera-io/json=1.*

Usage

<?php

use Herrera\Json\Json;

$json = new Json();

$json->validate($schema, $decoded); // throws Herrera\Json\Exception\JsonException

$data = $json->decode('{'); // throws Seld\JsonLint\ParsingException

About

A library for simplifying JSON linting and validation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%