Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 30 lines (28 sloc) 942 Bytes
<html>
<head>
<link href="jsoneditor/jquery.json-editor.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jsoneditor/jquery-1.4.2.js"></script>
<script type="text/javascript" src="jsoneditor/jquery.json-editor.js"></script>
<script>
// Setup control buttons at bottom.
$(document).ready(function(){
JSONEditor.prototype.ADD_IMG = 'jsoneditor/add.png';
JSONEditor.prototype.DELETE_IMG = 'jsoneditor/delete.png';
var j = new JSONEditor($("#t"), 400, 400);
j.doTruncation(true);
j.showFunctionButtons();
});
</script>
</head>
<body>
<textarea id="t">{
"names": ["andy", "ben", "sam"],
"some_object": {
"foo": "bar",
"baz": [{ "woah": "there"}],
"long_line": "a b c d e f g h i j | a b c d e f g h i j | match(/dflkjdfkjhdfkjhdf/) | dfjkhsdfh | a b c d e f g h i j"
}
}
</textarea>
</body>
</html>