got tree traversal working a bit better
make render_json.py print genuine JSON now!