Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit dad7e84

Browse files
committed
Expand the Overview section to put some context to vocabularies
1 parent d29e9c4 commit dad7e84

File tree

1 file changed

+28
-10
lines changed

1 file changed

+28
-10
lines changed

‎jsonschema-core.xml

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,19 +127,37 @@
127127

128128
<section title="Overview">
129129
<t>
130-
This document proposes a new media type "application/schema+json" to identify a JSON
131-
Schema for describing JSON data.
132-
It also proposes a further optional media type, "application/schema-instance+json",
133-
to provide additional integration features.
130+
This document specifies the media type "application/schema+json" which
131+
can describe a set of JSON documents, classify documents as instances of this set,
132+
and to generate annotations about a given instance.
133+
It also specifies "application/schema-instance+json",
134+
to describe JSON documents known to be instances of a particular schema.
134135
JSON Schemas are themselves JSON documents.
135-
This, and related specifications, define keywords allowing authors to describe JSON
136-
data in several ways.
137136
</t>
138137
<t>
139-
JSON Schema uses keywords to assert constraints on JSON instances or annotate those
140-
instances with additional information. Additional keywords are used to apply
141-
assertions and annotations to more complex JSON data structures, or based on
142-
some sort of condition.
138+
A JSON Schema document consists of a set of keywords,
139+
typically encoded as properties in a JSON object.
140+
The name of the keyword is used as the property name,
141+
and any arguments to the keyword are provided as the value.
142+
</t>
143+
<t>
144+
Each keyword provides an assertion and/or annotations about the instance.
145+
Assertions declare constraints placed on potential instances.
146+
Given a schema and an instance, the schema "accepts" an instance whenever all the assertions accept,
147+
and the schema "rejects" when any of the assertions reject.
148+
Schemas may also be used to build a set of JSON documents:
149+
The "valid set" of a schema consists of all instances that the schema accepts,
150+
and the "invalid set" of a schema consists of all instances that the schema rejects.
151+
In a schema without any assertion keywords, the set of all instances is the set of all JSON documents.
152+
</t>
153+
<t>
154+
Schemas may also provide "annotations" to instances:
155+
metadata that describes the instance.
156+
For example, you can document the meaning of a property,
157+
provide localized labels for a property name,
158+
suggest a default value for new instances,
159+
generate a list of hyperlinks from the instance,
160+
or declare relationships between data.
143161
</t>
144162
<t>
145163
To facilitate re-use, keywords can be organized into vocabularies. A vocabulary

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /