Skip to content

Add a use statment that had tripped up an SO user: #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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