title: convert list to json using Jackson
body: <p>With the below code I have converted list to json but the format is as 
      follows:</p>
  
  <pre><code>{"GodownMaster":[{"pname":"FCI CHARLAPALLI","pcode":"16042"},
  {"pname":"MLS CIRCLE 1 L.B. NAGAR","pcode":"16016"},{"pname":"MLS CIRCLE 4 
  AZAMABAD","pcode":"16003"},{"pname":"MLS CIRCLE 6 
  VIDYANAGAR","pcode":"16005"},{"pname":"OTHERS","pcode":"1699"}]} 
  </code></pre>
  
  <hr>
  
  <p>but I want to convert it as : </p>
  
  <pre><code>[{"pname":"FCI CHARLAPALLI","pcode":"16042"},
  {"pname":"MLS CIRCLE 1 L.B. NAGAR","pcode":"16016"},{"pname":"MLS CIRCLE 4 
  AZAMABAD","pcode":"16003"},{"pname":"MLS CIRCLE 6 
  VIDYANAGAR","pcode":"16005"},{"pname":"OTHERS","pcode":"1699"}] 
  </code></pre>
  
  <p>Below is my spring controller :   </p>
  
  <pre><code>@RequestMapping("/getGodowns")
  public @ResponseBody Map 
  getGodownsBasedOnDistrict(@RequestParam(value="district_code") String 
  dist_code) {
  
  List&lt;CscGodownBean&gt; godown_list = null;
  Map&lt;String, List&lt;CscGodownBean&gt;&gt; m = new HashMap();
  String exception = null;
  try
  {
  //getting name and codes here
  godown_list = scm_service.getGodownListBesedOnDistCode(dist_code);
  }catch(Exception ex)
  {
  ex.printStackTrace();
  exception = ex.getMessage();
  }
  
  if(godown_list!=null) {
  for(int i=0;i&lt;godown_list.size();i++) {
  m.put("GodownMaster",godown_list);
  }
  }
  return m;
  }
  </code></pre>