The built in JSON datastore lets you define some static data to use to build the tree. Those two examples show a few basics of the JSON datastore format.
You can also force a node in a closed or open state (notice in the previous example, that the node having children is intially closed).