Sha256: d30f5f0e3a208b85887f0ec18031df005ea7b218215655ceed7c6b0abdb65a73

Contents?: true

Size: 1.1 KB

Versions: 2

Compression:

Stored size: 1.1 KB

Contents

# Jschematic

Jschematic is a JSON Schema v3 Validator for Ruby.

It is currently incomplete, alpha quality software.

Having said that, most of the core schema definition is supported
with these exceptions:

 * $ref
 * $schema
 * extends
 * divisibleBy
 * disallow

In addition to this, only IPv4, IPv6 and URI formats are currently
implemented.

Please report any bugs you find (and you will find bugs) at the issue
tracker here: https://github.com/msassak/jschematic/issues.

## Usage

    require 'jschematic'
    Jschematic.validate(json, schema)  # => true or false
    Jschematic.validate!(json, schema) # => true or raise Jschematic::ValidationError

`json` and `schema` above must be Ruby data structures, not real JSON.

Jschematic doesn't care how you turn JSON into Ruby (though we use the
fine yajl-ruby gem for testing).

## Testing

    $ cucumber
    $ rspec spec

Or `rake` if you want to run both.

## Links

* http://tools.ietf.org/html/draft-zyp-json-schema-03
* https://github.com/kriszyp/json-schema
* http://tools.ietf.org/html/rfc3986

## Copyright

Copyright (c) 2011 Mike Sassak. See LICENSE for details.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jschematic-0.0.2 README.md
jschematic-0.0.1 README.md