【问题标题】:Is there json schema of json schema?有json模式的json模式吗?
【发布时间】:2015-03-16 17:17:13
【问题描述】:

有 JSON Schema 的 JSON Schema 吗?在我的应用中,用户可以上传他的 JSON 架构,如果它是有效的 JSON 架构,我想验证它。

【问题讨论】:

标签: json jsonschema


【解决方案1】:

是的。 This 是 JSON Schema Draft-04 的元模式。您可以使用它来验证 JSON 是否是有效的 JSON 模式。

【讨论】:

    【解决方案2】:

    是的 - 建议架构通过声明 "$schema" 属性来引用它们正在实现的架构。在撰写本文时,这是最常见的"http://json-schema.org/draft-04/schema#"

    有关 $schema 关键字的一些讨论,请参阅 https://spacetelescope.github.io/understanding-json-schema/reference/schema.html

    【讨论】:

      猜你喜欢
      • 2012-03-06
      • 2014-12-01
      • 2018-03-13
      • 2016-12-21
      • 1970-01-01
      • 2019-08-02
      • 2014-09-04
      • 2022-06-11
      • 2019-11-22
      相关资源
      最近更新 更多