forked from project-open-data/json-validator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·113 lines (102 loc) · 4.96 KB
/
index.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="js/codemirror/lib/codemirror.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<style>
body {margin-top: 20px; }
#input { width: 100%; height: 250px; }
#feedback { color: red; font-size: 20px; }
#feedback.valid {color: green; font-weight: bold; }
label { font-weight: bold; }
.CodeMirror-scroll { height: 400px; }
</style>
<link rel="stylesheet" href="css/bootstrap-responsive.min.css">
<script src="js/vendor/modernizr-2.6.1-respond-1.1.0.min.js"></script>
</head>
<body>
<!--[if lt IE 7]>
<p class="chromeframe">You are using an outdated browser. <a href="http://browsehappy.com/">Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to better experience this site.</p>
<![endif]-->
<div class="container">
<h2>Check your data file</h2>
<label for="input">Enter data file:</label>
<textarea id="input">[
{
"title": "Data Catalog",
"description": "Version 1.0",
"keyword": "catalog",
"modified": "2013-05-09",
"publisher": "US Department of X",
"person": "Contact Person",
"mbox": "[email protected]",
"identifier": "1",
"accessLevel": "Public",
"distribution": [{
"accessURL": "http://agency.gov/data.json",
"format": "json"
}]
},
{
"title": "Public Elementary/Secondary Listing",
"description": "The purpose of the CCD nonfiscal surveys is to provide a listing of all schools and agencies providing free public elementary and secondary education, along with basic descriptive statistical information on each school and agency listed. Penalties apply for misuse, seehttp://nces.ed.gov/ncesglobal/data_usage_agreement.aspfor more details.",
"keyword": "education, schools",
"modified": "2011-11-19",
"publisher": "US Department of Education",
"person": "Open Data Initiative",
"mbox": "[email protected]",
"identifier": "ykv5-fn9t",
"accessLevel": "Public",
"dataDictionary": "http://nces.ed.gov/ccd/pdf/INsc09101a.pdf",
"distribution": [{
"accessURL": "https://explore.data.gov/views/ykv5-fn9t/rows.csv?accessType=DOWNLOAD",
"format": "csv",
"size": "200mb"
},{
"accessURL": "https://explore.data.gov/views/ykv5-fn9t/rows.json?accessType=DOWNLOAD",
"format": "json"
},{
"accessURL": "https://explore.data.gov/views/ykv5-fn9t/rows.xml?accessType=DOWNLOAD",
"format": "xml"
}],
"webService": "http://explore.data.gov/api/views/ykv5-fn9t/rows.json",
"license": "Public Domain",
"spatial": "US",
"temporal": "2009-09-01 00:00:00,2010-05-31 00:00:00",
"frequency": "one-time",
"language": "English",
"granularity": "",
"dataQuality": "true",
"theme": "education",
"references": "http://nces.ed.gov/ccd/data/txt/psu091alay.txt",
"landingPage": "http://ed.gov/developer",
"feed": "",
"systemOfRecords": "http://nces.ed.gov/ccd/"
}]</textarea>
<input type="checkbox" id="require_if_available" name="require_if_available" value="true" onchange="window.rebuild_schema();project_open_data_validator.validate()"> Require "Required if Applicable" Fields<br>
<input type="checkbox" id="require_extended" name="require_extended" value="true" onchange="window.rebuild_schema();project_open_data_validator.validate()"> Require all Extended Fields<br>
<h3>Status</h3>
<div id="feedback"></div>
<h3>Additional Resources</h3>
<ul>
<li><a href="https://gist.github.com/3952577">JSON 101</a></li>
<li><a href="http://jsonlint.com/">JSON Validator</a> (useful for your JSON not properly parsing)</li>
<li><a href="http://project-open-data.github.io/schema/">Schema Definition</a>
</ul>
</div> <!-- /container -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="js/amanda/releases/latest/amanda.min.js"></script>
<script src="js/codemirror/lib/codemirror.js"></script>
<script src="js/codemirror/mode/javascript/javascript.js"></script>
<script src="js/schema.js"></script>
<script src="js/validate.js"></script>
</body>
</html>