generate the right json file