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 details)
Built Distribution
File details
Details for the file jsonvalidate-0.1.7.tar.gz
.
File metadata
- Download URL: jsonvalidate-0.1.7.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cc62adb9984133073c8da45982a3b8195a8dc053289f20cbad8f03199674705 |
|
MD5 | 3c56405c4ec6d7f292a07ca1a24374fa |
|
BLAKE2b-256 | 24cf42584bf63ac03bc95a1fde397ccc11b5aa7a76bfaa482d878ca046e0020e |
File details
Details for the file jsonvalidate-0.1.7-py2.py3-none-any.whl
.
File metadata
- Download URL: jsonvalidate-0.1.7-py2.py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 771c2b0c247966d085efa134b2dc29369e41c4e098162e2cda6aa9e3ac8dd865 |
|
MD5 | 4e59e4ed2ba75a9c4a81ae300609c642 |
|
BLAKE2b-256 | a543ca6aa0f8f8288e1d267a11b74f73036112a6ab329139862c3565891062f4 |