简体   繁体   English

json模式语义验证

[英]json schema semantics validation

I have been given a input which is a and I need to validate that it is a valid as in semantically. 我得到了一个输入,我需要验证它在语义上是否是有效的

I am using and didn't find any api which validates the itself to be a valid one. 我正在使用 ,但未找到任何可将本身验证为有效的api。 For instance if I want to validate a uri, I can use a constructor to make sure the input uri string is valid. 例如,如果我要验证uri,则可以使用构造函数来确保输入的uri字符串有效。

Is there a way to validate the semantics of ? 有没有一种方法可以验证的语义?

Thanks! 谢谢!

You'll want to use the "meta schema". 您将要使用“元模式”。 Found here under the Meta Schema heading. 在此处位于“元模式”标题下。 They are specifically schema's for validating other schemas depending on what feature set you're using. 它们是专门用于验证其他架构的架构,具体取决于您使用的功能集。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM