title: How to pass Json object from ajax to spring mvc controller?
body: <p>I am working on SpringMVC, I am passing data from ajax to controller but i got null value in my controller please check my code below</p>
  
  <pre><code>function searchText()
  {
     var sendData = {
      "pName" : "bhanu",
       "lName" :"prasad"
     }
    $.ajax({
  type: "POST",
   url: "/gDirecotry/ajax/searchUserProfiles.htm,
      async: true,
      data:sendData,
      success :function(result)
      {
      }
   }
  </code></pre>
  
  <p><strong>MyControllerCode</strong></p>
  
  <pre><code>         RequestMapping(value="/gDirecotry/ajax/searchUserProfiles.htm",method=RequestMethod.POST)
  
         public  @ResponseBody String  getSearchUserProfiles(HttpServletRequest request)
         {
           String pName = request.getParameter("pName");
           //here I got null value
         }
  </code></pre>
  
  <p>any one help me</p>