Outputting a list of navigation states to a JSON file