create tree like html code from json
Switch branches/tags
Nothing to show
Clone or download
Latest commit 4cbc1de Sep 25, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
css ensure line break for long values Jul 29, 2015
dist version bump 0.2.2 Sep 25, 2017
imgs added a couple of screen shots Sep 8, 2013
src escape json string values Sep 25, 2017
tests escape json string values Sep 25, 2017
.gitignore added grunt to project Jun 19, 2015
Gruntfile.js added first tests Jun 20, 2015
LICENSE added mit license file Jul 26, 2016
README.md Update README.md Jun 26, 2014
example.html refactored all code and styles Jun 23, 2015
package-lock.json updated grunt and dependencies Sep 11, 2017
package.json version bump 0.2.2 Sep 25, 2017

README.md

json-tree

simple JS library that creates an html navigable tree from JSON object.

Example

<html lang="en">
	<head>
		<title>json tree example</title>
		<link href="css/jsontree.css" rel="stylesheet">
		<script src="jsontree.js"></script>
  	</head>
	<body>
		<div id="example"></div>
	</body>
	<script>
	var json = {"foo" : "bar", "foos" : ["b","a","r"], "bar" : {"foo":"bar", "bar":false,"foobar":1234}};
	document.getElementById("example").innerHTML = JSONTree.create(json);
	</script>
</html>

Full view example 1 Collapsed view example 2