added json generation code for creating values of form