Representing serialized object in javascript

What's the best way to represent linked object (for example, a tree) in javascript literal?

In perl, you can represent hash table, array and list in literal with references.

{
a => 1,
b => { a => 2,
b => undef }
}

For JS, I found this example in treeview.net

foldersTree = gFld("<i>Treeview Demo</i>", "demoFramesetRightFrame.html")
aux1 = insFld(foldersTree, gFld("Photos example", "demoFramesetRightFrame.html"))
aux2 = insFld(aux1, gFld("United States", "http://www.treeview.net/treemenu/demopics/beenthere_america.gif"))
insDoc(aux2, gLnk("R", "Boston", "http://www.treeview.net/treemenu/demopics/beenthere_boston.jpg"))
insDoc(aux2, gLnk("R", "New York", "http://www.treeview.net/treemenu/demopics/beenthere_newyork.jpg"))

Basically it's instantiating an object and adding it to its parent using object's method.

But it's not as clean comparing to the perl way. Especially if it is a config file or it has a lot of nodes (it is not trivial, say, to move a section of the nodes around and reattach it to another place).

OTOH, we could just use array
[1, [2, undef]]
but the node will not have the method associated with it (unlike new TreeNode(...)), so I'll have to go thru the list of array and instantiate the object when needed (BTW the perl example above also doesn't address this) in a later time.

Again for very large tree there'll be performance hit.

So to look at this in a different angle, is there a way to serialize an object database (in the treeview example it's just a n-way tree) in javascript (maybe thousands of node) to string and read it back later on in a efficient way?
[1810 byte] By [codegurucom] at [2007-11-19 11:06:56]