[英]Can I validate json Schema draft-7 with tv4?
I have to upgrade a javascript application that validates json with json schema. 我必须升级一个使用JSON模式验证JSON的JavaScript应用程序。 The old version is using tv4 to validate json schema draft 4. I need to use draft-7 in the new software. 旧版本使用tv4验证json模式草稿4。我需要在新软件中使用draft-7。
I just replace a draft-7 json file in the current code. 我只是在当前代码中替换了draft-7 json文件。 It worked fine at the beginning, but later the app started to show some errors related to tv4. 一开始它运行良好,但后来该应用程序开始显示一些与tv4有关的错误。
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"lastName": {
"type": "string"
},
...
}
My question is can I use tv4 with draft-7. 我的问题是我可以将tv4与草案7一起使用。 Is there any draft-7 library to replace tv4? 有没有草稿7库可以替代tv4?
我发现我用ajv库替换了tv4
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.