|
126 | 126 | <section title="Keyword Behaviors">
|
127 | 127 | <t>
|
128 | 128 | 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. |
133 | 147 | </t>
|
134 | 148 | <t>
|
135 | 149 | Extension keywords SHOULD stay within these categories, keeping in mind
|
|
140 | 154 | </t>
|
141 | 155 | <section title="Applicators" anchor="applicators">
|
142 | 156 | <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 |
144 | 159 | <xref target="schema-document">schema document</xref> begins by applying
|
145 | 160 | the <xref target="root">root schema</xref> to the complete instance
|
146 | 161 | document. From there, keywords known as applicators are used to determine
|
|
0 commit comments