2013-01-06 05:19:38 +08:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<head>
|
2014-05-30 04:13:37 +08:00
|
|
|
<title>JSONEditor | Viewer</title>
|
2013-11-16 01:11:50 +08:00
|
|
|
<link rel="stylesheet" type="text/css" href="../jsoneditor.css">
|
|
|
|
<script type="text/javascript" src="../jsoneditor.js"></script>
|
|
|
|
<style type="text/css">
|
|
|
|
body {
|
|
|
|
font: 11pt arial;
|
|
|
|
}
|
|
|
|
#jsoneditor {
|
|
|
|
width: 500px;
|
|
|
|
}
|
|
|
|
</style>
|
2013-01-06 05:19:38 +08:00
|
|
|
</head>
|
|
|
|
<body>
|
2013-11-16 01:11:50 +08:00
|
|
|
<p>
|
|
|
|
This editor is read-only (mode='viewer').
|
|
|
|
</p>
|
|
|
|
<div id="jsoneditor"></div>
|
2013-01-06 05:19:38 +08:00
|
|
|
|
2013-11-16 01:11:50 +08:00
|
|
|
<script type="text/javascript" >
|
|
|
|
var container = document.getElementById('jsoneditor');
|
2013-08-28 04:50:20 +08:00
|
|
|
|
2013-11-16 01:11:50 +08:00
|
|
|
var options = {
|
|
|
|
mode: 'view'
|
|
|
|
};
|
2013-08-28 04:50:20 +08:00
|
|
|
|
2013-11-16 01:11:50 +08:00
|
|
|
var json = {
|
|
|
|
'array': [1, 2, 3],
|
|
|
|
'boolean': true,
|
|
|
|
'null': null,
|
|
|
|
'number': 123,
|
|
|
|
'object': {'a': 'b', 'c': 'd'},
|
|
|
|
'string': 'Hello World'
|
|
|
|
};
|
2013-08-28 04:50:20 +08:00
|
|
|
|
2014-05-30 04:13:37 +08:00
|
|
|
var editor = new JSONEditor(container, options, json);
|
2013-11-16 01:11:50 +08:00
|
|
|
</script>
|
2013-01-06 05:19:38 +08:00
|
|
|
</body>
|
|
|
|
</html>
|