文件名称:jsonschema:Python的JSON模式的(其他)实现
文件大小:282KB
文件格式:ZIP
更新时间:2024-04-26 03:22:44
Python
jsonschema jsonschema是Python的实现。 >> > from jsonschema import validate >> > # A sample schema, like what we'd get from json.load() >> > schema = { ... "type" : "object" , ... "properties" : { ... "price" : { "type" : "number" }, ... "name" : { "type" : "string" }, ... }, ... } >> > # If no exception is raised by validate(), the instance is valid. >> > validate ( instan