<commit_before>var Example = React.createClass({
  propTypes: {},

  getDefaultProps: function() {
    return {};
  },

  getInitialState: function() {
    return {};
  },

  render: function() {
    var that = this;
    return FormGenerator.create({
      flat_field: {
        type: String,
        label: 'Flat Field'
      },
      enum_field: {
        type: String,
        enum: ['', 'value 1', 'value 2', 'value 3'],
        label: 'Enum field'
      },
      object_field: {
        type: {
          embedded_field1: {
            type: String,
            label: 'Embedded Field 1'
          },
          embedded_field2: {
            type: String,
            enum: ['embedded value 1', 'embedded value 2'],
            label: 'Embedded Field 2'
          },
          embedded_object: {
            type: {
              embedded_object_field1: {
                type: String,
                label: 'Embedded Object Field 1'
              },
              embedded_object_field2: {
                type: String,
                enum: [
                  'embedded object field value 1',
                  'embedded object field value 2'
                ],
                label: 'Embedded Object Field 2'
              }
            },
            label: 'Embedded Object'
          }
        },
        label: 'Simple Object Field'
      },
      array_field: {
        type: [String],
        label: 'Array of Strings'
      },
      simple_object_array: {
        type: [{
          obj_arr_field1: {
            type: String,
            label: 'Obj arr field 1'
          },
          obj_arr_field2: {
            type: String,
            label: 'Obj arr field 2'
          }
        }],
        label: 'Simple Object Array'
      },
      object_array_field: {
        type: [{
          flat_field: {
            type: String,
            label: 'Flat Object Array Field'
          },
          object_field: {
            type: {
              object_array_object_field1: {
                type: String,
                label: 'Flat Object-Array Object-Field'
              },
              object_array_array_field: {
                type: [{
                  object_array_object_array_field1: {
                    type: String,
                    label: 'Object-Array Object-Array Field 1'
                  },
                  object_array_object_array_field2: {
                    type: String,
                    label: 'Object-Array Object-Array Field 2'
                  }
                }],
                label: 'Object-Array Object-Array Field'
              }
            },
            label: 'Object Array Object Field'
          }
        }],
        label: 'Object Array'
      }
    }, 'myFormRef', function() {
      console.log('Submit clicked!');
      console.log('Parsing form!', that.refs.myFormRef.parse());
    });
  }
});<commit_msg>Update example to demonstrate complex schema parsing<commit_after>var Example = React.createClass({
  propTypes: {},

  getDefaultProps: function() {
    return {};
  },

  getInitialState: function() {
    return {};
  },

  render: function() {
    var that = this;
    return FormGenerator.create({
      flat_field: {
        type: String,
        label: 'Flat Field'
      },
      enum_field: {
        type: String,
        enum: ['', 'value 1', 'value 2', 'value 3'],
        label: 'Enum field'
      },
      simple_object_field: {
        type: {
          embedded_field1: {
            type: String,
            label: 'Embedded Field 1'
          },
          embedded_field2: {
            type: String,
            enum: ['', 'embedded value 1', 'embedded value 2'],
            label: 'Embedded Field 2'
          }
        },
        label: 'Simple Object Field'
      },
      simple_array_field: {
        type: [String],
        label: 'Array of Strings'
      },
      simple_object_array: {
        type: [{
          obj_arr_field1: {
            type: String,
            label: 'Object array field 1'
          },
          obj_arr_field2: {
            type: String,
            label: 'Object array field 2'
          }
        }],
        label: 'Simple Object Array'
      },
      object_of_objects: {
        type: {
          flat_field1: {
            type: String,
            label: 'Embedded string field'
          },
          embedded_object1: {
            type: {
              embedded_object_field1: {
                type: String,
                label: 'Embedded Object Field 1'
              },
              embedded_object_field2: {
                type: String,
                enum: [
                  'embedded object field value 1',
                  'embedded object field value 2'
                ],
                label: 'Embedded Object Field 2'
              },
              embedded_object_object: {
                type: {
                  embedded_object_object_field: {
                    type: String,
                    label: 'Embedded object object field'
                  }
                },
                label: 'Embedded object object'
              }
            },
            label: 'Embedded Object Field'
          }
        },
        label: 'Object of Objects'
      },
      complex_object_array_field: {
        type: [{
          flat_field: {
            type: String,
            label: 'Flat Object Array Field'
          },
          object_field: {
            type: {
              object_array_object_field1: {
                type: String,
                label: 'Flat Object-Array Object-Field'
              },
              object_array_array_field: {
                type: [{
                  object_array_object_array_field1: {
                    type: String,
                    label: 'Object-Array Object-Array Field 1'
                  },
                  object_array_object_array_field2: {
                    type: String,
                    label: 'Object-Array Object-Array Field 2'
                  }
                }],
                label: 'Object-Array Object-Array Field'
              }
            },
            label: 'Object Array Object Field'
          }
        }],
        label: 'Object Array'
      }
    },
    'myFormRef',
    function() {
      console.log('Submit clicked!');
      console.log('Parsing form!', that.refs.myFormRef.parse());
    });
  }
});
{'fraction_non_alphanumeric': 0.09971822166562304, 'fraction_numerical': 0.007827175954915467, 'mean_word_length': 1.1599053414469236, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4006346', 'n_tokens_mistral': 1738, 'n_tokens_neox': 1627, 'n_words': 394}