views:

552

answers:

2

So, is there a VERY simple library that will render JSON objects as trees? I know that this can be done in many ways (such as YUI), but for debug purposes I'd like to simply be able to view a JSON objects I receive from a server as a tree, nothing fancy (but collapsable tree's would be a bonus).

The kind of solution I'm looking for would be something like:

<script source="something.js"/>
<script>
   obj ={"hello":"world"}
   lib.renderJSON("someid",obj);
</script>
...    
<div id="someid"/>

Any ideas?

+4  A: 

Would this jQuery library work for you?

http://jstree.com/jsTree/examples/

marzagao
Thanks that's exactly what I needed, and it requires little code to get basic functionality!
Robert Gould
+1  A: 

check this too: http://jquery.bassistance.de/treeview/demo/async.html

Amit