-
Notifications
You must be signed in to change notification settings - Fork 82
/
index.html
97 lines (91 loc) · 3.98 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
<!doctype html>
<html>
<head>
<title>JSON 2 HTML</title>
<meta charset="utf-8">
<link href="css/modern-normalize.css" rel="stylesheet" type="text/css">
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="css/modal.css" rel="stylesheet" type="text/css">
<script src="js/util.js" type="text/javascript"></script>
<script src="js/extended-types.js" type="text/javascript"></script>
<script src="js/tree.js" type="text/javascript"></script>
<script src="js/render.js" type="text/javascript"></script>
<script src="js/modal.js" type="text/javascript"></script>
<script src="js/statistics.js" type="text/javascript"></script>
<script src="js/parse.js" type="text/javascript"></script>
<script src="js/output.js" type="text/javascript"></script>
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon">
</head>
<body>
<div id="header">
<img alt="json 2 html" src="images/logo.png" />
</div>
<form onsubmit="doParse(); return false;">
<p>
This page offers an easy way to visualize a string of JSON text.
Put some JSON into the text area, and this page will instantly display the text as a set of nested boxes,
corresponding to the objects, arrays and values in the JSON string.<br>
You can also paste a URL into the textarea, and the JSON string will be loaded from the URL.
</p>
<p>
JSON 2 HTML is open source and released under the MIT license -
<a href="http://github.com/bloopletech/json2html/tree/master">get the source on github</a>. Patches / improvements are welcomed!
</p>
<code>
<textarea id="text" rows="12" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
</code>
<input id="submit" onclick="doParse(); return false;" type="submit" value="json 2 html">
<input id="reset" type="button" value="reset">
</form>
<hr>
<div id="output"></div>
<div id="footer">
Check out my portfolio at
<a href="http://i.bloople.net">i.bloople.net</a>. © Brenton Fletcher. Comments? e-mail me:
<a href="mailto:[email protected]">[email protected]</a>.
</div>
<div id="focus">
<div id="focus-output">
<div>
<label>Property path:</label> <code id="focus-path"></code>
</div>
<div>
<label>Trail:</label> <span id="focus-trail"></span>
</div>
<div>
<label>Type:</label> <span id="focus-type"></span><span id="focus-extended-type"></span>
</div>
</div>
<div id="actions">
<input type="button" id="show-stats" value="Statistics" disabled>
<input type="button" id="show-help" value="Help">
</div>
</div>
<div id="help-content">
<h3>JSON</h3>
<p>
<img id="json-logo" alt="JSON logo" src="images/json.gif">
<i>Quoting from the home page of <a href="http://www.json.org/">JSON</a></i><br>
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.
</p>
<h3>Syntax Highlighting</h3>
<p>
<span class="string">Colour for text and null values.</span><br>
<span class="number">Colour for numbers.</span><br>
<span class="boolean">Colour for true and false values.</span><br>
<span class="void">Colour for void values.</span><br>
<img class="ex" src="images/object.png" />
Background for Objects.<br>
<img class="ex" src="images/array.png" />
Background for Arrays.<br>
<img class="ex" src="images/objectt.png" />
Background for Object name/value pair tables.<br>
<img class="ex" src="images/arrayt.png" />
Background for Array value tables.</p>
<h3>Note</h3>
<p>
Individual 'words' that are extremely long may be broken into two or more lines to conserve horizontal space.
</p>
</div>
</body>
</html>