@@ -122,19 +122,14 @@ interpreted according to this data model is called an "instance".
122122An instance has one of six primitive types, and a range of possible values
123123depending on the type:
124124
125- null: A JSON "null" value
126-
127- boolean: A "true" or "false" value, from the JSON "true" or "false" value
128-
129- object: An unordered set of properties mapping a string to an instance, from the
130- JSON "object" value
131-
132- array: An ordered list of instances, from the JSON "array" value
133-
134- number: An arbitrary-precision, base-10 decimal number value, from the JSON
135- "number" value
136-
137- string: A string of Unicode code points, from the JSON "string" value
125+ - * null* : A JSON "null" value
126+ - boolean: A "true" or "false" value, from the JSON "true" or "false" value
127+ - * object* : An unordered set of properties mapping a string to an instance, from
128+ the JSON "object" value
129+ - * array* : An ordered list of instances, from the JSON "array" value
130+ - * number* : An arbitrary-precision, base-10 decimal number value, from the JSON
131+ "number" value
132+ - * string* : A string of Unicode code points, from the JSON "string" value
138133
139134Whitespace and formatting concerns, including different lexical representations
140135of numbers that are equal within the data model, are thus outside the scope of
@@ -201,18 +196,14 @@ A JSON Schema MUST be an object or a boolean.
201196Object properties that are applied to the instance are called keywords, or
202197schema keywords. Broadly speaking, keywords fall into one of five categories:
203198
204- identifiers: control schema identification through setting a IRI for the schema
205- and/or changing how the base IRI is determined
206-
207- assertions: produce a boolean result when applied to an instance
208-
209- annotations: attach information to an instance for application use
210-
211- applicators: apply one or more subschemas to a particular location in the
212- instance, and combine or modify their results
213-
214- reserved locations: do not directly affect results, but reserve a place for a
215- specific purpose to ensure interoperability
199+ - * identifiers* : control schema identification through setting a IRI for the
200+ schema and/or changing how the base IRI is determined
201+ - * assertions* : produce a boolean result when applied to an instance
202+ - * annotations* : attach information to an instance for application use
203+ - * applicators* : apply one or more subschemas to a particular location in the
204+ instance, and combine or modify their results
205+ - * reserved locations* : do not directly affect results, but reserve a place for
206+ a specific purpose to ensure interoperability
216207
217208Keywords may fall into multiple categories, although applicators SHOULD only
218209produce assertion results based on their subschemas' results. They should not
@@ -241,9 +232,8 @@ schema processing optimizations. They behave identically to the following schema
241232objects (where ` not ` is part of the subschema application vocabulary defined in
242233this document).
243234
244- ` true ` : Always passes validation, as if the empty schema ` {} `
245-
246- ` false ` : Always fails validation, as if the schema ` { "not": {} } `
235+ - ` true ` : Always passes validation, as if the empty schema ` {} `
236+ - ` false ` : Always fails validation, as if the schema ` { "not": {} } `
247237
248238While the empty schema object is unambiguous, there are many possible
249239equivalents to the ` false ` schema. Using the boolean values ensures that the
@@ -890,7 +880,7 @@ vocabulary's keywords.
890880Meta-schema authoring is an advanced usage of JSON Schema, so the design of
891881meta-schema features emphasizes flexibility over simplicity.
892882
893- #### The $schema Keyword {#keyword-schema}
883+ #### The ` $schema ` Keyword {#keyword-schema}
894884
895885The ` $schema ` keyword is both used as a JSON Schema dialect identifier and as
896886the identifier of a resource which is itself a JSON Schema, which describes the
@@ -917,7 +907,7 @@ the following options:
917907Values for this property are defined elsewhere in this and other documents, and
918908by other parties.
919909
920- #### The $vocabulary Keyword
910+ #### The ` $vocabulary ` Keyword
921911
922912The ` $vocabulary ` keyword is used in meta-schemas to identify the vocabularies
923913available for use in schemas described by that meta-schema, and whether each
@@ -1048,7 +1038,7 @@ Several keywords can accept a relative [IRI-reference](#rfc3987), or a value
10481038used to construct a relative IRI-reference. For these keywords, it is necessary
10491039to establish a base IRI in order to resolve the reference.
10501040
1051- #### The $id Keyword {#id-keyword}
1041+ #### The ` $id ` Keyword {#id-keyword}
10521042
10531043The ` $id ` keyword identifies a schema resource with its [ canonical] ( #rfc6596 )
10541044IRI.
@@ -1128,10 +1118,11 @@ as the same IRI through the use of `$id`, `$anchor`, `$dynamicAnchor`, or any
11281118other mechanism, implementations SHOULD raise an error condition. Otherwise the
11291119result is undefined, and even if documented will not be interoperable.
11301120
1131- #### Schema References {#references} Several keywords can be used to reference a
1132- schema which is to be applied to the current instance location. ` $ref ` and
1133- ` $dynamicRef ` are applicator keywords, applying the referenced schema to the
1134- instance.
1121+ #### Schema References {#references}
1122+
1123+ Several keywords can be used to reference a schema which is to be applied to the
1124+ current instance location. ` $ref ` and ` $dynamicRef ` are applicator keywords,
1125+ applying the referenced schema to the instance.
11351126
11361127As the values of ` $ref ` and ` $dynamicRef ` are IRI References, this allows the
11371128possibility to externalise or divide a schema across multiple files, and
@@ -1143,7 +1134,7 @@ if it is a network-addressable URL, and implementations SHOULD NOT assume they
11431134should perform a network operation when they encounter a network-addressable
11441135IRI.
11451136
1146- ##### Direct References with $ref {#ref}
1137+ ##### Direct References with ` $ref ` {#ref}
11471138
11481139The ` $ref ` keyword is an applicator that is used to reference a statically
11491140identified schema. Its results are the results of the referenced schema.[ ^ 5 ]
@@ -1156,7 +1147,7 @@ Resolved against the current IRI base, it produces the IRI of the schema to
11561147apply. This resolution is safe to perform on schema load, as the process of
11571148evaluating an instance cannot change how the reference resolves.
11581149
1159- ##### Dynamic References with $dynamicRef {#dynamic-ref}
1150+ ##### Dynamic References with ` $dynamicRef ` {#dynamic-ref}
11601151
11611152The ` $dynamicRef ` keyword is an applicator that allows for deferring the full
11621153resolution until runtime, at which point it is resolved each time it is
@@ -1182,7 +1173,7 @@ For a full example using these keyword, see {{recursive-example}}.[^6]
11821173[ ^ 6 ] : The difference between the hyper-schema meta-schema in pre-2019 drafts and
11831174an this draft dramatically demonstrates the utility of these keywords.
11841175
1185- #### Schema Re-Use With $defs {#defs}
1176+ #### Schema Re-Use With ` $defs ` {#defs}
11861177
11871178The ` $defs ` keyword reserves a location for schema authors to inline re-usable
11881179JSON Schemas into a more general schema. The keyword does not directly affect
@@ -1207,7 +1198,7 @@ the positive integer constraint is a subschema in `$defs`:
12071198}
12081199```
12091200
1210- ### Comments With $comment
1201+ ### Comments With ` $comment `
12111202
12121203This keyword reserves a location for comments from schema authors to readers or
12131204maintainers of the schema.
@@ -1650,15 +1641,15 @@ annotation collection, although they enable the same annotation keyword to be
16501641applied to an instance location with different values. Annotation keywords
16511642define their own rules for combining such values.
16521643
1653- ##### allOf {#allof}
1644+ ##### ` allOf ` {#allof}
16541645
16551646This keyword's value MUST be a non-empty array. Each item of the array MUST be a
16561647valid JSON Schema.
16571648
16581649An instance validates successfully against this keyword if it validates
16591650successfully against all schemas defined by this keyword's value.
16601651
1661- ##### anyOf
1652+ ##### ` anyOf `
16621653
16631654This keyword's value MUST be a non-empty array. Each item of the array MUST be a
16641655valid JSON Schema.
@@ -1668,15 +1659,15 @@ successfully against at least one schema defined by this keyword's value. Note
16681659that when annotations are being collected, all subschemas MUST be examined so
16691660that annotations are collected from each subschema that validates successfully.
16701661
1671- ##### oneOf
1662+ ##### ` oneOf `
16721663
16731664This keyword's value MUST be a non-empty array. Each item of the array MUST be a
16741665valid JSON Schema.
16751666
16761667An instance validates successfully against this keyword if it validates
16771668successfully against exactly one schema defined by this keyword's value.
16781669
1679- ##### not {#not}
1670+ ##### ` not ` {#not}
16801671
16811672This keyword's value MUST be a valid JSON Schema.
16821673
@@ -1698,7 +1689,7 @@ present. In particular, they MUST NOT be treated as if present with an empty
16981689schema, and when ` if ` is not present, both ` then ` and ` else ` MUST be entirely
16991690ignored.
17001691
1701- ##### if
1692+ ##### ` if `
17021693
17031694This keyword's value MUST be a valid JSON Schema.
17041695
@@ -1716,7 +1707,7 @@ If [annotations](#annotations) are being collected, they are collected from this
17161707keyword's subschema in the usual way, including when the keyword is present
17171708without either ` then ` or ` else ` .
17181709
1719- ##### then
1710+ ##### ` then `
17201711
17211712This keyword's value MUST be a valid JSON Schema.
17221713
@@ -1729,7 +1720,7 @@ validate against its subschema. Implementations MUST NOT evaluate the instance
17291720against this keyword, for either validation or annotation collection purposes,
17301721in such cases.
17311722
1732- ##### else
1723+ ##### ` else `
17331724
17341725This keyword's value MUST be a valid JSON Schema.
17351726
@@ -1742,7 +1733,7 @@ successfully validates against its subschema. Implementations MUST NOT evaluate
17421733the instance against this keyword, for either validation or annotation
17431734collection purposes, in such cases.
17441735
1745- ##### dependentSchemas
1736+ ##### ` dependentSchemas `
17461737
17471738This keyword specifies subschemas that are evaluated if the instance is an
17481739object and contains a certain property.
@@ -1756,7 +1747,7 @@ property.
17561747
17571748Omitting this keyword has the same behavior as an empty object.
17581749
1759- ##### propertyDependencies
1750+ ##### ` propertyDependencies `
17601751
17611752This keyword specifies subschemas that are evaluated if the instance is an
17621753object and contains a certain property with a certain string value.
@@ -1779,7 +1770,7 @@ results.
17791770
17801771#### Keywords for Applying Subschemas to Arrays
17811772
1782- ##### prefixItems
1773+ ##### ` prefixItems `
17831774
17841775The value of "prefixItems` MUST be a non-empty array of valid JSON Schemas.
17851776
@@ -1795,7 +1786,7 @@ keyword. This annotation affects the behavior of `items` and `unevaluatedItems`.
17951786
17961787Omitting this keyword has the same assertion behavior as an empty array.
17971788
1798- ##### items {#items}
1789+ ##### ` items ` {#items}
17991790
18001791The value of ` items ` MUST be a valid JSON Schema.
18011792
@@ -1825,7 +1816,7 @@ collection MUST do so.
18251816
18261817#### Keywords for Applying Subschemas to Objects
18271818
1828- ##### properties
1819+ ##### ` properties `
18291820
18301821The value of ` properties ` MUST be an object. Each value of this object MUST be a
18311822valid JSON Schema.
@@ -1841,7 +1832,7 @@ the Unevaluated vocabulary.
18411832
18421833Omitting this keyword has the same assertion behavior as an empty object.
18431834
1844- ##### patternProperties
1835+ ##### ` patternProperties `
18451836
18461837The value of ` patternProperties ` MUST be an object. Each property name of this
18471838object SHOULD be a valid regular expression, according to the ECMA-262 regular
@@ -1861,7 +1852,7 @@ behavior of `additionalProperties` (in this vocabulary) and
18611852
18621853Omitting this keyword has the same assertion behavior as an empty object.
18631854
1864- ##### additionalProperties {#additionalproperties}
1855+ ##### ` additionalProperties ` {#additionalproperties}
18651856
18661857The value of ` additionalProperties ` MUST be a valid JSON Schema.
18671858
@@ -1895,7 +1886,7 @@ failing schemas are dropped. See our [Decision
18951886Record] ( https://github.com/json-schema-org/json-schema-spec/tree/HEAD/adr/2022-04-08-cref-for-ambiguity-and-fix-later-gh-spec-issue-1172.md )
18961887for further details.
18971888
1898- ##### propertyNames
1889+ ##### ` propertyNames `
18991890
19001891The value of ` propertyNames ` MUST be a valid JSON Schema.
19011892
@@ -1907,7 +1898,7 @@ Omitting this keyword has the same behavior as an empty schema.
19071898
19081899#### Other Keywords for Applying Subschemas
19091900
1910- ##### maxContains
1901+ ##### ` maxContains `
19111902
19121903The value of this keyword MUST be a non-negative integer.
19131904
@@ -1917,7 +1908,7 @@ as described below in the section for that keyword.
19171908Validation MUST always succeed against this keyword. The value of this keyword
19181909is used as its annotation result.
19191910
1920- ##### minContains
1911+ ##### ` minContains `
19211912
19221913The value of this keyword MUST be a non-negative integer.
19231914
@@ -1931,7 +1922,7 @@ Per {{default-behaviors}}, omitted keywords MUST NOT produce annotation results.
19311922However, as described in the section for ` contains ` , the absence of this
19321923keyword's annotation causes ` contains ` to assume a minimum value of 1.
19331924
1934- ##### contains
1925+ ##### ` contains `
19351926
19361927The value of this keyword MUST be a valid JSON Schema.
19371928
@@ -2015,7 +2006,7 @@ outcomes. However, the keywords in this vocabulary are notable exceptions:
20152006 from ` properties ` , ` patternProperties ` , ` additionalProperties ` , ` contains ` ,
20162007 and itself
20172008
2018- ### unevaluatedItems {#unevaluateditems}
2009+ ### ` unevaluatedItems ` {#unevaluateditems}
20192010
20202011The value of ` unevaluatedItems ` MUST be a valid JSON Schema.
20212012
@@ -2046,7 +2037,7 @@ the behavior of `items`. This annotation affects the behavior of
20462037
20472038Omitting this keyword has the same assertion behavior as an empty schema.
20482039
2049- ### unevaluatedProperties {#unevaluatedproperties}
2040+ ### ` unevaluatedProperties ` {#unevaluatedproperties}
20502041
20512042The value of ` unevaluatedProperties ` MUST be a valid JSON Schema.
20522043
@@ -2238,7 +2229,7 @@ if they contain the same units, in any order.
22382229
22392230The JSON key for these additional results is "details".
22402231
2241- ### 12.4. Output Structure
2232+ ### Output Structure
22422233
22432234The output MUST be an object containing a boolean property named "valid". When
22442235additional information about the result is required, the output MUST also
@@ -2728,7 +2719,7 @@ action based on `$comment` contents.
27282719
27292720## IANA Considerations
27302721
2731- ### application/schema+json
2722+ ### ` application/schema+json `
27322723
27332724The proposed MIME media type for JSON Schema is defined as follows:
27342725
@@ -2748,7 +2739,7 @@ Interoperability considerations:: See Sections [6.2](#language),
27482739
27492740Fragment identifier considerations:: See {{fragments}}
27502741
2751- ### application/schema-instance+json
2742+ ### ` application/schema-instance+json `
27522743
27532744The proposed MIME media type for JSON Schema Instances that require a JSON
27542745Schema-specific media type is defined as follows:
0 commit comments