Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robusgauli/jsonvalidate
WIP
https://github.com/robusgauli/jsonvalidate
dict json json-schema json-schema-validator
Last synced: 2 months ago
JSON representation
WIP
- Host: GitHub
- URL: https://github.com/robusgauli/jsonvalidate
- Owner: RobusGauli
- License: mit
- Created: 2018-06-08T17:12:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-23T04:27:33.000Z (9 months ago)
- Last Synced: 2024-04-14T13:04:51.970Z (9 months ago)
- Topics: dict, json, json-schema, json-schema-validator
- Language: Python
- Homepage: https://jsonvalidate.readthedocs.io.
- Size: 71.3 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
- Authors: AUTHORS.rst
Awesome Lists containing this project
README
# JSON Validation Schema
JSON Validation Schema
* Free software: MIT license
* Documentation: https://jsonvalidate.readthedocs.io.Features
------------```python
from jsonvalidate import Object, String, Integerschema = 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': '[email protected]',
'name': 'robus',
'age': 342,
'address': {
'permanent': 'sd',
'temporary': 'asss'
}}
print(schema.check(payload))
```