Added function to save the (processed) category graph as a JSON file