A simple JSON schema checker
Project description
Python JSON Checker
A simple alternative to JSONSchema for JSON validation in Python programs.
Install from pip
pip install jsonism
Example usage
Import the checker
from jsonism.checker import validate
Basic flat objects
schema = {
"Bob": str,
"Lucy": int,
"Bert": bool
}
input = {
"Bob": "Is Bob",
"Lucy": 13,
"Bert": True
}
validate(input, schema)
Lists
input = ["Bob", "Alice", "John"]
schema = [str]
validate(input, schema)
Other stuff
input = {"Usernames": [{"username": "Bob", "age": 23}, {"username": "Bill", "age": 98}]}
schema = {"Usernames": [{"username": str, "age": int}]}
validate(input, schema)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jsonism-1.0.4.tar.gz
(3.6 kB
view hashes)