JSON validation Schema
Project description
# JSON Validation Schema
<a href="https://travis-ci.org/RobusGauli/jsonvalidate">
<img src="https://travis-ci.org/RobusGauli/jsonvalidate.svg?branch=master">
</a>
<a href="https://pypi.python.org/pypi/jsonvalidate">
<img src="https://img.shields.io/pypi/v/jsonvalidate.svg">
</a>
<a href="https://jsonvalidate.readthedocs.io/en/latest/?badge=latest">
<img src="https://readthedocs.org/projects/jsonvalidate/badge/?version=latest">
</a>
JSON Validation Schema
* Free software: MIT license
* Documentation: https://jsonvalidate.readthedocs.io.
Features
------------
```python
from jsonvalidate import Object, String, Integer
schema = Object({
'email': String(regex='[^@]+@[^@]+\.[^@]+'),
'name': String(),
'age': Integer(enums=[5, 6, 7]),
'address': Object({
'permanent': String(),
'temporary': String(min_length=3, enums=['asss', 's'])
})
})
payload = {
'email': 'robus@example.com',
'name': 'robus',
'age': 342,
'address': {
'permanent': 'sd',
'temporary': 'asss'
}
}
print(schema.check(payload))
```
=======
History
=======
0.1.0 (2018-06-08)
------------------
* First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jsonvalidate-0.1.7.tar.gz
(15.8 kB
view hashes)
Built Distribution
Close
Hashes for jsonvalidate-0.1.7-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 771c2b0c247966d085efa134b2dc29369e41c4e098162e2cda6aa9e3ac8dd865 |
|
MD5 | 4e59e4ed2ba75a9c4a81ae300609c642 |
|
BLAKE2b-256 | a543ca6aa0f8f8288e1d267a11b74f73036112a6ab329139862c3565891062f4 |