Skip to content

Commit 146ff95

Browse files
committed
Add quickstart to homepage
1 parent 806ba36 commit 146ff95

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

index.html

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,7 @@
44
permalink: /
55
---
66

7-
<h2>What does it do?</h2>
8-
<div class="block">
9-
<table class="key-value">
10-
<tr>
11-
<td class="key">JSON Schema</td>
12-
<td class="value">describes your JSON data format</td>
13-
</tr>
14-
<tr>
15-
<td class="key">JSON Hyper-Schema</td>
16-
<td class="value">turns your JSON data into hyper-text</td>
17-
</tr>
18-
</table>
19-
</div>
7+
<p><b>JSON Schema</b> is a vocabulary that allows you to <b>annotate</b> and <b>validate</b> JSON documents.</p>
208

219
<h2>Advantages</h2>
2210
<div class="block">
@@ -39,6 +27,25 @@ <h3>JSON Hyper-Schema</h3>
3927
</ul>
4028
</div>
4129

30+
31+
<h2>Quickstart</h2>
32+
33+
<p>The JSON document being validated or described we call the _instance_, and the document containing the description is called the _schema_.</p>
34+
35+
<p>The most basic schema is a blank JSON object, which constrains nothing, allows anything, and describes nothing:</p>
36+
37+
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{}</span><span class="w">
38+
</span></code></pre>
39+
</div>
40+
41+
<p>You can apply constraints on an instance by adding validation keywords to the schema. For instance, the "type" keyword can be used to restrict an instance to an object, array, string, number, boolean, or null:</p>
42+
43+
<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w"> </span><span class="nt">"type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"string"</span><span class="w"> </span><span class="p">}</span><span class="w">
44+
</span></code></pre>
45+
</div>
46+
47+
<p>JSON Schema is hypermedia ready, and ideal for annotating your existing JSON-based HTTP API. JSON Schema documents are identified by URIs, which can be used in HTTP Link headers, and inside JSON Schema documents to allow recursive definitions.</p>
48+
4249
<h2>More</h2>
4350
<div class="block">
4451
<p>Interested? Check out:

0 commit comments

Comments
 (0)