-
Notifications
You must be signed in to change notification settings - Fork 139
/
jsoneditor.html
171 lines (151 loc) · 4.68 KB
/
jsoneditor.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="jsoneditor.css"/>
<link rel="icon" href="logo-small.png"/>
<title>Flexi JSON Editor and Inspector</title>
<style>
body {
padding: 0 70px;
}
#json {
margin: 10px 10px 10px 32px;
width: 50%;
min-height: 70px;
}
h1 {
font-family: Arial;
color: #EBBC6E;
text-align: center;
text-shadow: 1px 1px 1px black;
border-bottom: 1px solid gray;
padding-bottom: 50px;
width: 500px;
margin: 20px auto;
}
h1 img {
float: left;
}
h1 b {
color: black;
font-weight: normal;
display: block;
font-size: 12px;
text-shadow: none;
}
#legend {
display: inline;
margin-left: 30px;
}
#legend h2 {
display: inline;
font-size: 18px;
margin-right: 20px;
}
#legend a {
color: white;
margin-right: 20px;
}
#legend span {
padding: 2px 4px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
color: white;
font-weight: bold;
text-shadow: 1px 1px 1px black;
background-color: black;
}
#legend .string { background-color: #009408; }
#legend .array { background-color: #2D5B89; }
#legend .object { background-color: #E17000; }
#legend .number { background-color: #497B8D; }
#legend .boolean { background-color: #B1C639; }
#legend .null { background-color: #B1C639; }
#expander {
cursor: pointer;
margin-right: 20px;
}
#footer {
font-size: 13px;
}
#rest {
margin: 20px 0 20px 30px;
}
#rest label {
font-weight: bold;
}
#rest-callback {
width: 70px;
}
#rest-url {
width: 700px;
}
label[for="json"] {
margin-left: 30px;
display: block;
}
#json-note {
margin-left: 30px;
font-size: 12px;
}
.addthis_toolbox {
position: relative;
top: -10px;
margin-left: 30px;
}
#disqus_thread {
margin-top: 50px;
padding-top: 20px;
padding-bottom: 20px;
border-top: 1px solid gray;
border-bottom: 1px solid gray;
}
</style>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-5029684-7']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<h1>
<img src="logo-small.png" alt="FlexiJSONEditor logo" />
<span>JSON Editor and Inspector</span>
<b>Inspect your JSON structures with ease.</b>
</h1>
<div id="legend">
<span><a href="http://www.daviddurman.com">Blog post & Usage</a></span>
<span id="expander">Expand all</span>
<span class="array">array</span>
<span class="object">object</span>
<span class="string">string</span>
<span class="number">number</span>
<span class="boolean">boolean</span>
<span class="null">null</span>
<span>Remove item by deleting a property name.</span>
</div>
<div id="rest">
<label>JSONP: </label><br/>
Callback: <input type="text" id="rest-callback" value="_callback" />
URL: <input type="text" value="" id="rest-url" />
<button id="btn-rest-url">display JSON</button>
</div>
<pre id="path"></pre>
<div id="editor" class="json-editor"></div>
<label for="json">Or paste JSON directly here:</label>
<p id="json-note">Note that you can edit your JSON directly in the textarea below.
The JSON viewer will get updated when you leave the field.</p>
<textarea id="json"></textarea><br/>
<p id="footer">Copyright © 2011-2013 David Durman (client IO, <a href="http://client.io">http://client.io</a>, [email protected])</p>
<script src="json2.js"></script>
<script src="jquery.min.js"></script>
<script src="jquery.jsoneditor.js"></script>
<script src="jsoneditor.js"></script>
</body>
</html>