|
78 | 78 |
|
79 | 79 | <section title="Objectives">
|
80 | 80 | <t>
|
81 |
| - JSON Schema shall be built to support two objectives, including expansion into uses not currently described by any use case, but fall within the objectives. |
| 81 | + JSON Schema shall be built to support the following objectives, including expansion into uses not currently described by any use case, but which fall within the objectives. |
82 | 82 | </t>
|
83 | 83 |
|
84 | 84 | <section title="Validation">
|
|
98 | 98 |
|
99 | 99 | <section title="Internet">
|
100 | 100 | <t>
|
101 |
| - JSON is a technology standardized as a part of a larger ecosystem of Internet technology, and likewise, JSON Schema may also specify how it is used in this ecosystem, for example, use in HTTP, or the meaning of media type parameters. |
| 101 | + JSON is a technology standardized as a part of a larger ecosystem of Internet technology, and likewise, JSON Schema may also specify its role in this ecosystem; for example, use in HTTP, or the meaning of media type parameters. |
102 | 102 | </t>
|
103 | 103 | </section>
|
104 | 104 |
|
|
107 | 107 | Use cases or requirements that do not advance these objectives are likely out of scope, and better suited in separate work that references JSON Schema.
|
108 | 108 | </t>
|
109 | 109 | <t>
|
110 |
| - For example, a method of describing an API interface would exceed the scope of JSON Schema, although JSON Schema may be used as a part of such a description, in the cases where describing JSON documents is necessary. |
| 110 | + For example, a method of describing an API interface would exceed the scope of JSON Schema, although JSON Schema may be used as a part of such a description, such as when the API is using JSON and needs a way to describe these JSON documents. |
111 | 111 | </t>
|
112 | 112 | </section>
|
113 | 113 |
|
114 | 114 | </section>
|
115 | 115 |
|
116 | 116 | <section title="Use Cases">
|
117 | 117 | <t>
|
118 |
| - JSON Schema shall standardize these use cases. |
| 118 | + JSON Schema shall written to standardize these use cases, or to accommodate implementations targeted at these uses. |
119 | 119 | </t>
|
120 | 120 |
|
121 | 121 | <section title="Structural validation" anchor="uc-structural">
|
|
246 | 246 |
|
247 | 247 | <section title="Extension points" anchor="extension-points">
|
248 | 248 | <t>
|
249 |
| - Application developers may wish to express a wide variety of constraints that would be impractical to require every validator to implement. |
250 |
| - </t> |
251 |
| - <t> |
252 |
| - Like in the <xref target="partial-validation">"Partial validation"</xref> use case, validators need to understand when the extension is not supported, and allow the application to determine if validation may continue without it. For example, if a Web API does not use XML, it would be unnecessary for its JSON validator to support keywords dealing with XML, so in this case, it's appropriate for its JSON validator to reject constraints dealing with XML altogether. |
| 249 | + Not every feature needs to be supported by every implementation. |
| 250 | + To accommodate a wide variety of niche audiences, it should be possible to specify features that are optional to implement. |
| 251 | + This includes standardized features that are optional to implement, and bespoke or user-defined features that are not standardized. |
| 252 | + Implementations that do not support optional extensions must degrade in a predictable fashion. |
253 | 253 | </t>
|
254 | 254 | </section>
|
255 |
| - </section> |
256 |
| - |
257 |
| - <section title="Use cases for extensions"> |
258 |
| - <t> |
259 |
| - This section lists use cases that are not required for interoperability and are not standardized, but fall within the objectives and could be standardized in the future. |
260 |
| - As specified in <xref target="extension-points">"Extension points,"</xref> |
261 |
| - validators should gracefully degrade in the presence of extensions that they do not support. |
262 |
| - </t> |
263 | 255 |
|
264 | 256 | <section title="External validation">
|
265 | 257 | <t>
|
266 |
| - JSON may embed resources of other media types, like base64 or hex-encoded documents; and may wish to pass off validation of these documents to another software tool. |
| 258 | + Authors may embed resources of other media types, such as text documents, or base64 or hex-encoded binary documents; and may wish to pass off validation of these documents to another software tool. |
267 | 259 | </t>
|
268 | 260 | </section>
|
269 | 261 |
|
|
295 | 287 | For example, for security reasons, a linter may need to ensure that a JSON document does not contain the string "<tt></script</tt>" but is written instead with a character escape such as "<tt><\/script</tt>". This would ensure that, if the JSON were to be embedded in a <tt><script></tt> tag, that it would not have any part that could close the tag and start being interpreted as HTML.
|
296 | 288 | </t>
|
297 | 289 | <t>
|
298 |
| - This is not a core part of JSON because it may violate the semantics of JSON, adding an ability to distinguish two documents that are supposed to be equal to the receiving application. |
| 290 | + This is not a standard part of JSON Schema because it may violate the semantics of JSON, by adding an ability to distinguish two documents that are supposed to be equal to the receiving application. |
299 | 291 | </t>
|
300 | 292 | </section>
|
301 | 293 | </section>
|
|
0 commit comments