title: Grails : How to access the params coming as JSON format
body: <p>from PHP application there is call to grails controller which sends data in JSON format.</p>
  
  <p>when i println the params </p>
  
  <pre><code>println params 
  </code></pre>
  
  <p>which prints</p>
  
  <pre><code>[{"courseCategory":null,"courseId":null,"show":null,
      "rows":6,"trainers":null,"courses":null,"cities":null,
      "fromDate":null,"toDate":null,"pageType":"HOME","deal":null}:,   
      action:getTrainingsAsJson, 
      controller:publicTraining]
  </code></pre>
  
  <p>when i do</p>
  
  <pre><code>println  params.rows
  println params.pageType
  </code></pre>
  
  <p>which prints <code>null</code></p>
  
  <p>i tried </p>
  
  <pre><code>  def jsonObject = request.JSON  // prints [:]
  </code></pre>
  
  <p>I have also tried with <code>JsonSlurper</code></p>
  
  <pre><code>def slurper = new JsonSlurper()
  def result = slurper.parseText(params)
  </code></pre>
  
  <p>which gives error</p>
  
  <pre><code>No signature of method: groovy.json.JsonSlurper.parseText() is applicable for argument types: (org.codehaus.groovy.grails.web.servlet.mvc.GrailsParameterMap)
  </code></pre>
  
  <p>how to convert it to retrieve the param values?</p>
  
  <p>or is there any way to convert it to map so that i can easily access the parameters?</p>