Write raw data to .json file