Reformat json intermediate format