title: Send complex json object to Spring MVC controller
body: <p>I am trying to send a complex object to ajax controller for spring mvc search engine, with 3 variables: the current page, items per page and the search parameters. The problem is that with the declaration of the controller method does not take me the params variable as a Map.</p>
  
  <p>As I can send the structure to collect on the controller 3 variables separately?</p>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Required Map parameter 'params' is not present</p>
  </blockquote>
  
  <pre><code>  var dataToSend = {
          'page': 1,
          'itemsPerPage': 10,
          'params': {
            'codItem': "10",
            'nameItem': "foo"
          }
        };  
  
        $.ajax({
          url: form.attr("action"),
          type: 'POST',
          data: JSON.stringify(dataToSend),
          dataType: 'json',
          cache: false
        }).success(function(data) {
          callback(data);
        });        
  
  
  
  
   public @ResponseBody HashMap&lt;String, Object&gt; search(@RequestParam(value="params") Map&lt;String, String&gt; params, @RequestParam(value = "page") int page, @RequestParam(value = "itemsPerPage") int itemsPerPage){
  };
  </code></pre>