convert one list (like arraylist ) which discribe one tree

     to  json string  showing in web or other place