title: Sending list in JSON request
body: <p>I am sending few 'fields' and 'lists' in JSON to Spring MVC Controller as below:</p>
  
  <pre><code>    var data = {
          'message' : 'Text data',
          '**listOfIds**' : '350234983, 378350950',
  
          'synchronizerToken' : formTokenId
  
  };
  
  $.ajax({
          url : 'testURL.do',
          type : 'post',
          data : data,
          cache : false,
          dataType : 'json',
  
          success : function (jsonResponse) {},
  
          error : function (error) {}
  });
  </code></pre>
  
  <p>In Spring MVC controller the URL handler looks like this:</p>
  
  <pre><code>    @RequestMapping(value = "/testURL.do", method = RequestMethod.POST)
  public ModelAndView executeTest( ListData listData) {
          ModelAndView    modelAndView    = null;
          JsonResponse    jsonResponse    = null;
  
          modelAndView    = executeTransaction(listData);
          } 
  
          return modelAndView;
      }
  
  
  ListData.java
  
  public class ListData{
      private String          message;
      private List&lt;String&gt;    **listOfIds** = new ArrayList&lt;String&gt;();   
  
  //getter/setters
  </code></pre>
  
  <p>The issue is <strong>listOfIds</strong> is not being returned as list. 
  It is returned as single string <strong>'350234983, 378350950'</strong></p>
  
  <p>Can anyone suggest if anything is wrong here or is there any better way to receive list in JSON response?</p>
  
  <p>Thanks,
  -Fonda</p>