我有一个 JsonSchema,将格式设置为“full-date”。所有 Draft-6 验证器(Json.Net)都接受此模式作为有效。
{
"title": "MyTestSchema",
"type": "object",
"properties": {
"MyDateValue": {
"type": "string",
"format": "full-date",
"description": "We expect yyyy-MM-dd"
}
}
}
但它无法识别这个 JSON 对象是否错误:
{
"MyDateValue": "2017-10-1"
}
当我将模式从“full-date”切换到“date”时,它可以正常工作:
{
"title": "MyTestSchema",
"type": "object",
"properties": {
"MyDateValue": {
"type": "string",
"format": "date",
"description": "We expect yyyy-MM-dd"
}
}
}
"full-date" 是否是 Json 规则中的正确术语?请参考一些文档。