user606521
user606521

Reputation: 15454

Is there json schema of json schema?

Is there JSON Schema of JSON Schema? In my app user can upload his JSON schema and I would like to validate it if it's a valid JSON Schema.

Upvotes: 14

Views: 1799

Answers (2)

Everett
Everett

Reputation: 9628

Yes - it is recommended that schemas reference the schema that they are implementing by declaring a "$schema" property. At the time of writing, this is most commonly "http://json-schema.org/draft-04/schema#"

See https://spacetelescope.github.io/understanding-json-schema/reference/schema.html for some discussion about the $schema keyword.

Upvotes: 0

Milo Yip
Milo Yip

Reputation: 5072

Yes. This is the meta-schema of JSON Schema draft-04. You can use it to validate whether a JSON is a valid JSON schema.

Upvotes: 18

Related Questions