A simple tree view to JSON