@@ -290,7 +290,7 @@ Schema document and resource concepts will be clarified in a future draft.
290290
291291Some keywords take schemas themselves, allowing JSON Schemas to be nested:
292292
293- ``` json
293+ ``` jsonschema
294294{
295295 "title": "root",
296296 "items": {
@@ -628,7 +628,7 @@ of multiple primitive types. The companion validation vocabulary also includes a
628628primitive types. This allows for a concise expression of use cases such as a
629629function that might return either a string of a certain length or a null value:
630630
631- ``` json
631+ ``` jsonschema
632632{
633633 "type": ["string", "null"],
634634 "maxLength": 255
@@ -696,7 +696,7 @@ the [Validation specification](#json-schema-validation):
696696
697697Note that some lines are wrapped for clarity.
698698
699- ``` json
699+ ``` jsonschema
700700{
701701 "title": "Feature list",
702702 "type": "array",
@@ -775,7 +775,7 @@ subschemas.
775775Note that the overall schema results may still include annotations collected
776776from other schema locations. Given this schema:
777777
778- ``` json
778+ ``` jsonschema
779779{
780780 "oneOf": [
781781 {
@@ -1185,7 +1185,7 @@ a valid JSON Schema.
11851185As an example, here is a schema describing an array of positive integers, where
11861186the positive integer constraint is a subschema in ` $defs ` :
11871187
1188- ``` json
1188+ ``` jsonschema
11891189{
11901190 "type": "array",
11911191 "items": { "$ref": "#/$defs/positiveInteger" },
@@ -1305,7 +1305,7 @@ that schema SHOULD be used automatically.
13051305
13061306For example, consider this schema:
13071307
1308- ``` json
1308+ ``` jsonschema
13091309{
13101310 "$id": "https://example.net/root.json",
13111311 "type": "array",
@@ -1361,7 +1361,7 @@ identify embedded schema resources or locations within them.
13611361Consider the following schema document that contains another schema resource
13621362embedded within it:
13631363
1364- ``` json
1364+ ``` jsonschema
13651365{
13661366 "$id": "https://example.com/foo",
13671367 "items": {
@@ -1383,7 +1383,7 @@ object, but that object's IRI relative to its resource's canonical IRI is
13831383Now consider the following two schema resources linked by reference using a IRI
13841384value for ` $ref ` :
13851385
1386- ``` json
1386+ ``` jsonschema
13871387{
13881388 "$id": "https://example.com/foo",
13891389 "items": {
@@ -1392,10 +1392,10 @@ value for `$ref`:
13921392}
13931393```
13941394
1395- ``` json
1395+ ``` jsonschema
13961396{
13971397 "$id": "https://example.com/bar",
1398- "additionalProperties" : { }
1398+ "additionalProperties": {}
13991399}
14001400```
14011401
@@ -2240,8 +2240,7 @@ details: the collection of results produced by subschemas
22402240
22412241For these examples, the following schema and instances will be used.
22422242
2243- Schema
2244- ``` json
2243+ ``` jsonschema
22452244{
22462245 "$schema": "https://json-schema.org/draft/next/schema",
22472246 "$id": "https://json-schema.org/schemas/example",
@@ -2284,16 +2283,15 @@ Schema
22842283}
22852284```
22862285
2287- Failing instance
2288- ``` json
2286+
2287+ ``` json "Failing instance"
22892288{
22902289 "foo" : {"foo-prop" : " not 1" , "other-prop" : false },
22912290 "bar" : {"bar-prop" : 2 }
22922291}
22932292```
22942293
2295- Passing instance
2296- ``` json
2294+ ``` json "Passing instance"
22972295{
22982296 "foo" : {
22992297 "foo-prop" : 1 ,
@@ -2381,8 +2379,7 @@ Output units which do not contain errors or annotations SHOULD be excluded from
23812379this format, however implementations MAY choose to include them for
23822380completeness.
23832381
2384- Failing results
2385- ``` json
2382+ ``` json "Failing results"
23862383{
23872384 "valid" : false ,
23882385 "details" : [
@@ -2417,8 +2414,7 @@ Failing results
24172414}
24182415```
24192416
2420- Passing results
2421- ``` json
2417+ ``` json "Passing results"
24222418{
24232419 "valid" : true ,
24242420 "details" : [
@@ -2495,8 +2491,7 @@ All output units are included in this format.
24952491
24962492The location properties of the root output unit MAY be omitted.
24972493
2498- Failing results (errors)
2499- ``` json
2494+ ``` json "Failing results (errors)"
25002495{
25012496 "valid" : false ,
25022497 "evaluationPath" : " " ,
@@ -2586,8 +2581,7 @@ Failing results (errors)
25862581}
25872582```
25882583
2589- Passing results (annotations)
2590- ``` json
2584+ ``` json "Passing results (annotations)"
25912585{
25922586 "valid" : true ,
25932587 "evaluationPath" : " " ,
@@ -2875,7 +2869,7 @@ Consider the following schema, which shows `$id` being used to identify both the
28752869root schema and various subschemas, and ` $anchor ` being used to define plain
28762870name fragment identifiers.
28772871
2878- ``` json
2872+ ``` jsonschema
28792873{
28802874 "$id": "https://example.com/root.json",
28812875 "$defs": {
@@ -2998,8 +2992,7 @@ schema allows and ignores other instance properties. The second is more strict
29982992and only allows the "data" and "children" properties. An example instance with
29992993"data" misspelled as "daat" is also shown.
30002994
3001- Tree schema, extensible
3002- ``` json
2995+ ``` jsonschema "Tree schema, extensible"
30032996{
30042997 "$schema": "https://json-schema.org/draft/next/schema",
30052998 "$id": "https://example.com/tree",
@@ -3018,8 +3011,7 @@ Tree schema, extensible
30183011}
30193012```
30203013
3021- Strict-tree schema, guards against misspelled properties
3022- ``` json
3014+ ``` jsonschema "Strict-tree schema, guards against misspelled properties"
30233015{
30243016 "$schema": "https://json-schema.org/draft/next/schema",
30253017 "$id": "https://example.com/strict-tree",
@@ -3030,8 +3022,7 @@ Strict-tree schema, guards against misspelled properties
30303022}
30313023```
30323024
3033- Instance with misspelled field
3034- ``` json
3025+ ``` jsonschema "Instance with misspelled field"
30353026{
30363027 "children": [ { "daat": 1 } ]
30373028}
@@ -3161,7 +3152,7 @@ which they are understood.
31613152
31623153This meta-schema combines several vocabularies for general use.
31633154
3164- ``` json
3155+ ``` jsonschema
31653156{
31663157 "$schema": "https://json-schema.org/draft/next/schema",
31673158 "$id": "https://example.com/meta/general-use-example",
@@ -3192,7 +3183,7 @@ This meta-schema combines several vocabularies for general use.
31923183
31933184This meta-schema describes only a single extension vocabulary.
31943185
3195- ```json
3186+ ``` jsonschema
31963187{
31973188 "$schema": "https://json-schema.org/draft/next/schema",
31983189 "$id": "https://example.com/meta/example-vocab",
@@ -3246,7 +3237,7 @@ generator should consider the reference target to be a distinct class, and how
32463237those classes are related. Note that this example is solely for illustrative
32473238purposes, and is not intended to propose a functional code generation keyword.
32483239
3249- ```json
3240+ ``` jsonschema
32503241{
32513242 "allOf": [
32523243 {
0 commit comments