title: Display JSON/YAML hierarchy as a tree in HTML?
body: <p>I have YAML data that looks sort of like this, but ~150k of it:</p>
  
  <pre><code>---
  all:
    foo: 1025
    bar:
      baz: 37628
      quux:
        a: 179
        b: 7
  </code></pre>
  
  <p>...or the same thing in JSON:</p>
  
  <pre><code>{"all":{"bar":{"baz":"37628","quux":{"a":"179","b":"7"}},"foo":"1025"}}
  </code></pre>
  
  <p>I want to present this content in an expandable JavaScripty HTML tree view (examples: <a href="http://developer.yahoo.com/yui/examples/treeview/default_tree.html" rel="noreferrer">1</a>, <a href="http://www.mattkruse.com/javascript/mktree/" rel="noreferrer">2</a>) to make it easier to explore. How do I do this?</p>
  
  <p>I guess what I really want to figure out is how to take this YAML/JSON data, and automatically display it as a tree (with hash keys sorted alphabetically). So far, I've been tussling with <a href="http://developer.yahoo.com/yui/treeview/" rel="noreferrer">YUI's tree view</a>, but it doesn't accept straight JSON, and my feeble attempts to massage the data into something useful don't seem to be working.</p>
  
  <p>Thanks for any help.</p>