forked from json-schema-org/json-schema-org.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamples.html
38 lines (36 loc) · 1019 Bytes
/
examples.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
layout: page
---
<h2>Basic example</h2>
<div class="block">
<p>Here is a basic example of a JSON Schema:
<pre class="json-schema">
{
"title": "Example Schema",
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"age": {
"description": "Age in years",
"type": "integer",
"minimum": 0
}
},
"required": ["firstName", "lastName"]
}
</pre>
</div>
<h2>Walkthroughs</h2>
<div class="block">
<p>The two examples below are step-by-step guides into building a schema:
<ul>
<li><a href="example1.html">a simple example</a> which covers a classical product catalog description.
<li><a href="example2.html">a more advanced example</a>, using JSON Schema to describe filesystem entries in a Unix-like /etc/fstab file.
</ul>
<p>The <a href="http://www.stsci.edu/">Space Telescope Science Institute</a> has also published an <a href="http://spacetelescope.github.io/understanding-json-schema/">guide aimed at schema authors</a>.
</div>