use fs to write put requests to json file