Update the printing code for JSON.