7

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.

user606521
  • 14,486
  • 30
  • 113
  • 204
  • @War10ck: That defines whether it's valid **JSON**, not whether it's a valid JSON **schema**. – T.J. Crowder Mar 16 '15 at 17:22
  • 4
    There is a meta-schema at http://json-schema.org/schema (or http://json-schema.org/hyper-schema if you need hyper-schema features). – cloudfeet Mar 16 '15 at 18:40

2 Answers2

14

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.

Milo Yip
  • 4,902
  • 2
  • 25
  • 27
0

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.

Everett
  • 8,746
  • 5
  • 35
  • 49