title: JQuery AJAX strange behaviour with parameters (Spring's @ModelAttribute)
body: <p>I'm trying to pass a Map&lt; String, String> to Spring via Ajax using @ModelAttribute notation.
  With IntelliJ's REST client, I just have to add the "infos[KEY]" param with value "VALUE" to get the corresponding key/value couple populated in the hashmap.</p>
  
  <p>I'm trying to reproduce the same behaviour with JQuery</p>
  
  <pre><code>function update()
  {
       $.ajax(
            {
              type: "PATCH",
              url: "url",
              dataType: "json",
              data: {"infos[TheAnswer]": "42"},
              success: function(data)
                {
                  alert("OK");
                }
            });
  }
  </code></pre>
  
  <p>But Spring controller can't get to populate my model.
  Here it is (but i shouldn't be the problem because as I said IntelliJ's REST client works fine)</p>
  
  <pre><code>public class ExtraInfos implements Serializable
  {
      protected HashMap&lt;String, String&gt; infos = new HashMap&lt;String, String&gt;();
  
      public HashMap&lt;String, String&gt; getInfos()
      {
          return infos;
      }
  
      public void setInfos(HashMap&lt;String, String&gt; infos)
      {
          this.infos = infos;
      }
  }
  </code></pre>
  
  <p>Here's my controller's method:</p>
  
  <pre><code>@RequestMapping(value = "/{id}", method = RequestMethod.PATCH)
  public
  @ResponseBody
  Contact updateContact(@PathVariable("id") Long id,
                        @ModelAttribute ExtraInfos infos)
  {
      return this.service.update(id, infos);
   }
  </code></pre>