title: Json serialize to java pojo with nested List<pojo> property
body: <p>Below is my code attempt to post an Json serialize object (java pojo having list of other pojos) with JQuery Ajax call to Spring MVC controller.</p>
  
  <p>Getting Bad request error from server. </p>
  
  <p>When the modalForm data is removed from the Json object the MainPojo data received correctly at server side.</p>
  
  <p>Html Code</p>
  
  <pre><code>   Fisrt form
     ------------- 
      &lt;form id="mainForm"&gt;
             .....
      &lt;/form&gt;
  
      Form in the modal
      -----------------
      &lt;form  id="modelform" ..&gt;
           &lt;div id="row"&gt; 
      &lt;input type="text" id="subject" /&gt;
      &lt;input type="text" id="max" /&gt;
      &lt;input type="text" id="min" /&gt;
        &lt;/div&gt;
       &lt;div id="row"&gt; 
      &lt;input type="text" id="subject" /&gt;
      &lt;input type="text" id="max" /&gt;
      &lt;input type="text" id="min" /&gt;
       &lt;/div&gt;
           ............. 
      &lt;/form&gt;}
  </code></pre>
  
  <p>Jquery </p>
  
  <pre><code>          var mainObject = $('#mainForm').serializeObject();
  
            var modelObject = $('#modelform').serializeObject();
  
            mainObject.marks = modelObject;
  </code></pre>
  
  <p>Json ( Expected)</p>
  
  <pre><code>          {
              "name": "Some Name",
               "age": "10",
               "marks": [
                 {
                   "subject": "maths",
                   "max": "20",
               "min":"12"
                  },
                 {
                   "subject": "english",
                   "max": "20",
               "min":"12",
                  }
                ]
            }
  </code></pre>
  
  <p>Json (actual output with the above code)</p>
  
  <pre><code>           {
               "name": "Some Name",
                "age": "10",
                "marks": [
                          {
                           "subject": "maths",
                           "subject": "english"
                           },
                           {
                            "max": "20",
                         "max":"20",
                            },
                        {
                         "min": "12",
                         "min":"12"
                         }
                            ]
                 }
  
                   //Ajax call
                   $.ajax({
                         url: '/save',
                     type: 'POST',
                     contentType: 'application/json',
                     mimeType: 'application/json',
                     data : JSON.stringify(mainObject),
                     dataType: 'json',
                     success: function(data) {
                        alert(data.msg);
                     },
                     error:function (xhr, ajaxOptions, thrownError) {
                        alert('Technical error occured');
                     }
             });
  </code></pre>
  
  <p>Java Pojo's</p>
  
  <pre><code>          public class MainPojo {
  
              private String name;
              private String age;            
                  private Lists&lt;marks&gt;
                  ..................
            }
  
            public class ModelPojo {
  
              private String subject;
              private String maxMarks;
              private String minMarks;
  
                  .....................
              }
  </code></pre>
  
  <p>Controller Method</p>
  
  <pre><code>@RequestMapping(value = "save", headers = "Accept=application/json",
                  method = RequestMethod.POST)
  public @ResponseBody String save(@RequestBody final  MainPojo  mainPojo) {
  
  } 
  </code></pre>
  
  <p>Please help me to identify the problem.</p>
  
  <p>Thank You.</p>