Format Assertion Vocabulary Official

A vocabulary to defines and asserts semantic information about string-encoded values.

To make use of this vocabulary, modify your metaschema to declare the use of this vocabulary using the $vocabulary keyword and evaluate its metaschema. If the vocabulary must be present for an implementation to proceed:

{
  ...
  "$vocabulary": {
    ...
    "https://json-schema.org/draft/2020-12/vocab/format-assertion": true
  },
  "allOf": [
    { "$ref": "https://json-schema.org/draft/2020-12/meta/format-assertion" }
  ]
}

Otherwise, if it is optional for implementations to understand this vocabulary to proceed:

{
  ...
  "$vocabulary": {
    ...
    "https://json-schema.org/draft/2020-12/vocab/format-assertion": false
  },
  "allOf": [
    { "$ref": "https://json-schema.org/draft/2020-12/meta/format-assertion" }
  ]
}

Keywords

Keyword Kind Instance Summary
format Annotation Assertion String Define and assert semantic information about a string instance.