Skip to content

Commit 1e532b0

Browse files
committed
Use cases: Merge standard and extension use cases
1 parent fe5efce commit 1e532b0

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

jsonschema-use-cases.xml

+10-18
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878

7979
<section title="Objectives">
8080
<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.
8282
</t>
8383

8484
<section title="Validation">
@@ -98,7 +98,7 @@
9898

9999
<section title="Internet">
100100
<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.
102102
</t>
103103
</section>
104104

@@ -107,15 +107,15 @@
107107
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.
108108
</t>
109109
<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.
111111
</t>
112112
</section>
113113

114114
</section>
115115

116116
<section title="Use Cases">
117117
<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.
119119
</t>
120120

121121
<section title="Structural validation" anchor="uc-structural">
@@ -246,24 +246,16 @@
246246

247247
<section title="Extension points" anchor="extension-points">
248248
<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.
253253
</t>
254254
</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>
263255

264256
<section title="External validation">
265257
<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.
267259
</t>
268260
</section>
269261

@@ -295,7 +287,7 @@
295287
For example, for security reasons, a linter may need to ensure that a JSON document does not contain the string "<tt>&lt;/script</tt>" but is written instead with a character escape such as "<tt>&lt;\/script</tt>". This would ensure that, if the JSON were to be embedded in a <tt>&lt;script&gt;</tt> tag, that it would not have any part that could close the tag and start being interpreted as HTML.
296288
</t>
297289
<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.
299291
</t>
300292
</section>
301293
</section>

0 commit comments

Comments
 (0)