Metadata-Version: 2.1
Name: jsonism
Version: 1.0.4
Summary: A simple JSON schema checker
Home-page: https://github.com/bmcollier/jsonism
Author: Ben Collier
Author-email: bencollier@fastmail.com
License: 3-Clause BSD
Platform: UNKNOWN
Description-Content-Type: text/markdown
License-File: LICENSE.md

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

```python
from jsonism.checker import validate
```

### Basic flat objects

```python
schema = {
    "Bob": str,
    "Lucy": int,
    "Bert": bool
}
input = {
    "Bob": "Is Bob",
    "Lucy": 13,
    "Bert": True
}
validate(input, schema)
```

### Lists

```python
input = ["Bob", "Alice", "John"]
schema = [str]
validate(input, schema)
```

### Other stuff
```python
input = {"Usernames": [{"username": "Bob", "age": 23}, {"username": "Bill", "age": 98}]}
schema = {"Usernames": [{"username": str, "age": int}]}
validate(input, schema)
```



