writes out all of the categories to a json file