json_schema 0.3
JSON schema definition and validation library
json_schema is a JSON-based schema validation package.
JSON-based means that its feature-set is adjusted to JSON, but it doesn't require JSON data: any Python objects are fine, as long as they're of the primary Python types.
Let's start off with an example:
from json_schema import Schema, AnyInteger
my_schema = Schema([u"set-temp", {u"degrees": AnyInteger}])
if my_schema.validate([u"set-temp", {u"degrees": 10}]):
print "Valid!"
It's a very declarative way of saying how your schema looks. With the architechture that json_schema is built on, you can customize pretty much anything.
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| json_schema-0.3.tar.gz (md5) | Source | 2008-08-05 | 5KB | 890 | |
- Author: Ludvig Ericson
- Home Page: http://lericson.blogg.se/code/category/json_schema.html
- Package Index Owner: toxik
- DOAP record: json_schema-0.3.xml
