JSON Validation Schema
jsonvalidate的Python项目详细描述
json验证模式
<;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/?徽章=最新“>;
<;img src=”https://readthedocs.org/projects/jsonvalidate/badge/?version=latest“>;
<;/a>;
*免费软件:mit许可证
*文档:https://jsonvalidate.readthedocs.io.
功能
----
``python
from jsonvalidate import object,string,整数
schema=对象({
“email”:字符串(regex='[^@]+@[^@]+\.[^@]+'),
“name”:字符串(),
“age”:整数(枚举数=[5,6,7]),
“address”:对象({
“permanent”:字符串(),
“temporary”:字符串(最小长度=3,枚举数=['asss','s'])
})
})
payload={
'email':'robus@example.com',
'name':'robus',
'age':342,
'address':{
'permanent':'sd',
“临时”:“asss”
}
==
=
历史
==
<0.1.0(2018-06-08)
----
*PYPI首次发布。