Content Vocabulary Official Included By Default
A vocabulary that defines keywords for annotating instances that contain non-JSON data encoded in JSON strings.
Dialect | 2019-09 |
---|---|
URI | https://json-schema.org/draft/2019-09/vocab/content |
Specification | https://json-schema.org/draft/2019-09/draft-handrews-json-schema-validation-02#rfc.section.8 |
Authors | |
Metaschema | https://json-schema.org/draft/2019-09/meta/content |
Also see |
Your metaschema is likely already declaring this vocabulary
This vocabulary is included by default when using the official metaschema of this dialect: https://json-schema.org/draft/2019-09/schema. Unless you are using a custom metaschema, there is nothing else you need to do.
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/2019-09/vocab/content": true
},
"allOf": [
{ "$ref": "https://json-schema.org/draft/2019-09/meta/content" }
]
}
Otherwise, if it is optional for implementations to understand this vocabulary to proceed:
{
...
"$vocabulary": {
...
"https://json-schema.org/draft/2019-09/vocab/content": false
},
"allOf": [
{ "$ref": "https://json-schema.org/draft/2019-09/meta/content" }
]
}
Keywords
Keyword | Kind | Instance | Summary |
---|---|---|---|
contentEncoding | Annotation | String | The string instance should be interpreted as encoded binary data and decoded using the encoding named by this property. |
contentMediaType | Annotation | String | This keyword declares the media type of the string instance. |
contentSchema | Annotation | String | This keyword declares a schema which describes the structure of the string. |