Skip to content

Commit 18c4be7

Browse files
committed
Started re-vamp of website
1 parent bec7b8e commit 18c4be7

16 files changed

+655
-764
lines changed

content/implementations.html

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
<div class="block">
2+
<p>Implementations below are written in different languages, and support part, or all, of the
3+
specification.</p>
4+
5+
<p>Implementations below are classified based on their functionality. When known, the
6+
license of the project is also mentioned.</p>
7+
</div>
8+
9+
<div class="show-hide" data-target="validator-list"></div>
10+
<h2>Validators</h2>
11+
<div class="block" id="validator-list">
12+
<h3>JavaScript</h3>
13+
<ul>
14+
<li><a id="link-impl-direct-schema" href="http://github.com/IreneKnapp/direct-schema">direct-schema</a> (BSD)</li>
15+
<li><a id="link-impl-jsv" href="http://github.com/garycourt/JSV">JSV</a> (BSD)</li>
16+
<li><a id="link-impl-kriszyp-jsonschema" href="http://github.com/kriszyp/json-schema">json-schema</a> (AFL or BSD) as part of <a id="link-impl-persvr" href="http://www.persvr.org/">Persevere</a></li>
17+
<li><a id="link-impl-schema-js" href="https://github.com/akidee/schema.js">schema.js</a> (MIT)</li>
18+
</ul>
19+
20+
<h3>Python</h3>
21+
<ul>
22+
<li><a id="link-impl-jsonschema" href="https://github.com/Julian/jsonschema">jsonschema</a> (MIT)</li>
23+
<li><a id="link-impl-zyga-json-schema-validator" href="https://github.com/zyga/json-schema-validator">json-schema-validator</a> (LGPL)</li>
24+
</ul>
25+
26+
<h3>Ruby</h3>
27+
<ul>
28+
<li><a id="link-impl-ruby-jsonchema" href="https://github.com/Constellation/ruby-jsonchema">ruby-jsonschema</a> (MIT)</li>
29+
<li><a id="link-impl-ruby-hoxworth-json-schema" href="https://github.com/hoxworth/json-schema">json-schema</a> (MIT)</li>
30+
</ul>
31+
32+
<h3>PHP</h3>
33+
<ul>
34+
<li><a id="link-impl-php-json-schema" href="https://github.com/hasbridge/php-json-schema">php-json-schema</a> (MIT)</li>
35+
<li><a id="link-impl-json-schema" href="https://github.com/justinrainbow/json-schema">json-schema</a> (Berkeley)</li>
36+
</ul>
37+
38+
<h3>Java</h3>
39+
<ul>
40+
<li><a id="link-impl-fge-json-schema-validator" href="https://github.com/fge/json-schema-validator">json-schema-validator</a> (LGPLv3)</li>
41+
</ul>
42+
43+
<h3>.NET</h3>
44+
<ul>
45+
<li><a id="link-impl-json-net" href="http://james.newtonking.com/projects/json-net.aspx">Json.NET</a> (MIT)</li>
46+
</ul>
47+
48+
<h3>ActionScript 3</h3>
49+
<ul>
50+
<li><a id="link-impl-frigga" href="https://github.com/raulbajales/Frigga">Frigga</a> (MIT)</li>
51+
</ul>
52+
53+
<h3>C</h3>
54+
<ul>
55+
<li><a id="link-impl-wjelement" href="https://github.com/netmail-open/wjelement">WJElement</a> (LGPLv3)</li>
56+
</ul>
57+
58+
<h3>Haskell</h3>
59+
<ul>
60+
<li><a id="link-impl-aeson-schema" href="https://github.com/timjb/aeson-schema">aeson-schema</a> (MIT)</li>
61+
</ul>
62+
</div>
63+
64+
<div class="show-hide" data-target="schema-generation-list"></div>
65+
<h2>Schema generation</h2>
66+
<div class="block" id="schema-generation-list">
67+
<h3>.NET</h3>
68+
<ul>
69+
<li><a id="link-impl-json-net" href="http://james.newtonking.com/projects/json-net.aspx">Json.NET</a> (MIT) - generates schemas from .NET types</li>
70+
</ul>
71+
72+
<h3>Online (web tool)</h3>
73+
<ul>
74+
<li><a href="http://www.jsonschema.net/">jsonschema.net</a> - generates schemas from example data</li>
75+
</ul>
76+
</div>
77+
78+
<div class="show-hide" data-target="parsing-list"></div>
79+
<h2>Data parsing</h2>
80+
<div class="block" id="parsing-list">
81+
<h3>Haskell</h3>
82+
<ul>
83+
<li><a id="link-impl-aeson-schema" href="https://github.com/timjb/aeson-schema">aeson-schema</a> (MIT) - generates code for a parser</li>
84+
</ul>
85+
86+
<h3>Ruby</h3>
87+
<ul>
88+
<li><a id="link-impl-autoparse" href="https://github.com/google/autoparse">autoparse</a> (ASL 2.0)</li>
89+
</ul>
90+
</div>
91+
92+
<div class="show-hide" data-target="documentation-list"></div>
93+
<h2>Documentation generation</h2>
94+
<div class="block" id="documentation-list">
95+
<h3>JavaScript</h3>
96+
<ul>
97+
<li><a id="link-impl-matic" href="https://github.com/mattyod/matic">Matic</a> (MIT)</li>
98+
</ul>
99+
</div>
100+
101+
<div class="show-hide" data-target="other-list"></div>
102+
<h2>Other</h2>
103+
<div class="block" id="other-list">
104+
<h3>JavaScript</h3>
105+
<ul>
106+
<li><a id="link-impl-orderly" href="http://orderly-json.org">Orderly</a> (BSD)</li>
107+
<li><a id="link-impl-dojo" href="http://www.dojotoolkit.org/">Dojo</a> (AFL or BSD) - supports some aspects of JSON Schema</li>
108+
</ul>
109+
</div>

content/index.html

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<h2>What does it do?</h2>
2+
<div class="block">
3+
<table class="key-value">
4+
<tr>
5+
<td class="key">JSON Schema</td>
6+
<td class="value">describes your JSON data format</td>
7+
</tr>
8+
<tr>
9+
<td class="key">JSON Hyper-Schema</td>
10+
<td class="value">turns your JSON data into hyper-text</td>
11+
</tr>
12+
</table>
13+
</div>
14+
15+
<h2>Advantages</h2>
16+
<div class="block">
17+
<h3>JSON Schema</h3>
18+
<ul>
19+
<li>describes your existing data format</li>
20+
<li>clear, human- and machine-readable documentation</li>
21+
<li>complete structural validation, useful for
22+
<ul>
23+
<li>automated testing</li>
24+
<li>validating client-submitted data</li>
25+
</ul>
26+
</li>
27+
</ul>
28+
<h3>JSON Hyper-Schema</h3>
29+
<ul>
30+
<li>describes your existing API - no new structures required</li>
31+
<li>links (including <a href="http://tools.ietf.org/html/rfc6570">URI Templates</a> for target URIs)</li>
32+
<li>forms - specify a JSON Schema for the desired data</li>
33+
</ul>
34+
</div>
35+
36+
<h2>More</h2>
37+
<div class="block">
38+
<p>Interested? Check out:
39+
<ul>
40+
<li>the <a href="documentation.html">specification</a></li>
41+
<li>some <a href="examples.html">examples</a></li>
42+
<li>the growing list of<a href="software.html">JSON (Hyper-)Schema software</a></li>
43+
</ul>
44+
<p>Questions? Feeling helpful? Get involved on:
45+
<ul>
46+
<li>the <a href="http://github.com/json-schema/json-schema">GitHub repo</a></li>
47+
<li>the <a href="https://groups.google.com/forum/#!forum/json-schema">Google Group</a></li>
48+
</ul>
49+
</div>

generate.php

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<?php
2+
3+
header("Content-Type: text/plain");
4+
5+
$menu = array(
6+
"about" => "index.html",
7+
"docs" => "documentation.html",
8+
"examples" => "examples.html",
9+
"software" => "implementations.html"
10+
);
11+
12+
$pages = array(
13+
"index.html" => array(
14+
"content" => "content/index.html",
15+
"menu" => "about",
16+
"pageTitle" => "JSON Schema and Hyper-Schema"
17+
),
18+
"implementations.html" => array(
19+
"content" => "content/implementations.html",
20+
"menu" => "software",
21+
"pageTitle" => "JSON Schema Software"
22+
)
23+
);
24+
25+
foreach ($pages as $outputFile => $pageSpec) {
26+
echo "Rendering: $outputFile:\n";
27+
ob_start();
28+
?>
29+
30+
<html>
31+
<head>
32+
<title><?php echo $pageSpec['pageTitle']; ?></title>
33+
<link href="style/css/green-theme.css" rel="stylesheet">
34+
<script type="text/javascript">
35+
var _gaq = _gaq || [];
36+
var pluginUrl = '//www.google-analytics.com/plugins/ga/inpage_linkid.js';
37+
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
38+
_gaq.push(['_setAccount', 'UA-37169005-1']);
39+
_gaq.push(['_trackPageview']);
40+
41+
(function() {
42+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
43+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
44+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
45+
})();
46+
</script>
47+
<link rel="stylesheet" href="lib/json-highlight.css"></link>
48+
</head>
49+
<body>
50+
<script src="style/js/jquery.js"></script>
51+
<div class="page-container" align=center>
52+
<div class="page-header">
53+
<h1>json-schema.org</h1>
54+
<div class="tagline">The home of JSON Schema</div>
55+
</div>
56+
57+
<div class="page-content">
58+
<div class="page-menu">
59+
<?php
60+
foreach ($menu as $text => $target) {
61+
if ($text == $pageSpec['menu']) {
62+
echo "<a class=\"selected\" href=\"$target\">$text</a> ";
63+
} else {
64+
echo "<a href=\"$target\">$text</a> ";
65+
}
66+
}
67+
?>
68+
</div>
69+
70+
<?php
71+
readfile($pageSpec['content']);
72+
?>
73+
</div>
74+
</div>
75+
<script src="style/js/json-highlight.js"></script>
76+
<script src="style/js/show-hide.js"></script>
77+
</body>
78+
</html>
79+
<?php
80+
$fullPage = ob_get_clean();
81+
if (!file_put_contents($outputFile, $fullPage)) {
82+
echo "\terror setting file contents\n";
83+
} else {
84+
echo "\tsuccess\n";
85+
}
86+
}
87+
echo "done.\n";
88+
?>

0 commit comments

Comments
 (0)