PDA

View Full Version : How to Debug Json Data for TreeLoader



brookd
25 Nov 2007, 10:43 AM
I have some JSON data that is returned via a treeLoader to populate a tree. it doesn't work, the root node is loaded from the JSON Data and then the loading circle just spins and the rest of the tree never loads.

I have tried with a simpler JSON Structrue (less parent/children) and it works. I know the JSOn data is valid. I have used firebug to dump it out and it 'looks' fine. So how do I debug it to find he problem? I am not getting any error messages...

brookd
25 Nov 2007, 11:03 AM
Well, I threw the JSON into a text file and changed my treeLoader to call that script. Line by line I went through it removing children. It turned out to be that whenever I had child nodes and I had set expanded:true in the data, this was failing if I was using preloadChildren:true on the treeLoader.