简体   繁体   English

是否有JSON Schema草稿4规范的架构?

[英]Is there a schema for the JSON Schema draft 4 spec?

Is there a JSON schema that describes the JSON Schema draft 4 spec? 是否有描述JSON Schema草案4规范的JSON架构 Ie a schema that describes the format of the schema. 即一个描述模式格式的模式。

Yes. 是。 And it's referenced in the $schema property of JSON schemas: JSON模式的$schema属性中引用了它:

"$schema": "http://json-schema.org/draft-04/schema#"

From the documentation : 文档中

The $schema keyword is both used as a JSON Schema version identifier and the location of a resource which is itself a JSON Schema, which describes any schema written for this particular version. $schema关键字既用作JSON架构版本标识符,又用作资源的位置,该资源本身就是JSON架构,该资源描述了为此特定版本编写的任何架构。

This keyword MUST be located at the root of a JSON Schema. 此关键字必须位于JSON模式的根目录。 The value of this keyword MUST be a URI [RFC3986] and a valid JSON Reference [json-reference]; 此关键字的值必须为URI [RFC3986]和有效的JSON参考[json-reference]; this URI MUST be both absolute and normalized. 此URI必须同时是绝对的和规范化的。 The resource located at this URI MUST successfully describe itself. 位于此URI的资源必须成功描述自己。 It is RECOMMENDED that schema authors include this keyword in their schemas. 建议架构作者在其架构中包含此关键字。

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

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