Extract the code that generates the actual JSON update