Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This library provides JSON schema validation using the schema found at http://json-schema.org.
This library provides JSON schema validation using the schema found at http://json-schema.org.
Note that it is not yet feature complete, but does support basic validation. The JSON schema
draft can be found at http://tools.ietf.org/html/draft-zyp-json-schema-03

Expand All @@ -7,11 +7,13 @@ draft can be found at http://tools.ietf.org/html/draft-zyp-json-schema-03

## Usage

use Json\Validator as JsonValidator;

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

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

$validator->validate($jsonObject);


Expand Down Expand Up @@ -59,4 +61,4 @@ The following definitions are not yet supported:
- extends
- id
- $ref
- $schema
- $schema