generates json file