load_nodes_from_input_file = function() -- side effects: Nodes, Root, Cursor_node -- load JSON from Input_filename local f = io.open(Input_filename) assert(f) local thread = json.decode(f:read('*a')) f:close() load_nodes_from_json(thread) end