New functions: generate_json_field and generate_json_form