Skip to content

Commit e80b135

Browse files
committed
Explain evaluation, minor wording improvements
1 parent 719629d commit e80b135

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

jsonschema-core.xml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,24 @@
126126
<section title="Keyword Behaviors">
127127
<t>
128128
JSON Schema keywords fall into several general behavior categories.
129-
Assertions validate that an instance satisfies constraints, annotations
130-
attach information that applications may use in any way they see fit,
131-
and applicators allow for building more complex schemas than a single
132-
schema object would allow.
129+
Assertions validate that an instance satisfies constraints. Annotations
130+
attach information that applications may use in any way they see fit.
131+
Applicators apply subschemas to parts of the instance and combine
132+
their results.
133+
</t>
134+
<t>
135+
Evaluating an instance against a schema involves processing all of the
136+
keywords in the schema against the appropriate locations within the instance.
137+
Typically, applicator keywords are processed until a schema object with no
138+
applicators (and therefore no subschemas) is reached. The appropriate
139+
location in the instance is evaluated against the assertion and
140+
annotation keywords in the schema object, and their results are gathered
141+
into the parent schema according to the rules of the applicator.
142+
</t>
143+
<t>
144+
Evaluation of a parent schema object can complete once all of its
145+
subschemas have been evaluated, although in some circumstance evaluation
146+
may be short-circuited due to assertion results.
133147
</t>
134148
<t>
135149
Extension keywords SHOULD stay within these categories, keeping in mind
@@ -140,7 +154,8 @@
140154
</t>
141155
<section title="Applicators" anchor="applicators">
142156
<t>
143-
Evaluation of an instance against a
157+
Applicators allow for building more complex schemas than can be accomplished
158+
with a single schema object. Evaluation of an instance against a
144159
<xref target="schema-document">schema document</xref> begins by applying
145160
the <xref target="root">root schema</xref> to the complete instance
146161
document. From there, keywords known as applicators are used to determine

0 commit comments

Comments
 (0)