【发布时间】:2021-12-07 18:51:34
【问题描述】:
在 JSON 模式中,可以要求对象中的某些键,请参阅此示例,取自 json schema docs:
{
"type": "object",
"properties": {
"name": { "type": "string" },
"email": { "type": "string" },
"address": { "type": "string" },
"telephone": { "type": "string" }
},
"required": ["name", "email"]
}
我需要相反:有没有办法禁止或防止某个键在对象中?具体来说,我想防止用户在对象中拥有一个空键:
{
"": "some string value"
}
【问题讨论】:
标签: jsonschema