title: How to receive a Json Object as parameter on a @RequestMapping(method = RequestMethod.GET)
body: <p>So I have been harldy looking for an answer to this with no success.</p>
  
  <p>I want to receive a "complex" param as JSON at my GET method.</p>
  
  <p>How could I do it?</p>
  
  <p>This is the method:</p>
  
  <pre><code>@RequestMapping(method = RequestMethod.GET, value = "/test2", consumes = {MediaType.APPLICATION_JSON_VALUE})
  @ResponseBody
  public ResponseEntity&lt;?&gt; test2(@RequestParam PojoParam pojoParam) {
      return new ResponseEntity&lt;&gt;(pojoParam, HttpStatus.OK);
  }
  </code></pre>
  
  <p>This is the PojoParam:</p>
  
  <pre><code>public class PojoParam implements java.io.Serializable {
      private String stringVariable;
      private int intVariable;
  
      public PojoParam() {
      }
  
      public String getStringVariable() {
          return stringVariable;
      }
  
      public int getIntVariable() {
          return intVariable;
      }
  
      public void setStringVariable(String stringVariable) {
          this.stringVariable = stringVariable;
      }
  
      public void setIntVariable(int intVariable) {
          this.intVariable = intVariable;
      }
  }
  </code></pre>
  
  <p>Invoke example:</p>
  
  <pre><code>... /test2?pojoParam={intVariable:2, stringVariable:"as"}
  </code></pre>
  
  <p>Response example:</p>
  
  <pre><code>{
      "timestamp": "2016-06-16T15:09:36Z",
      "status": 500,
      "error": "Internal Server Error",
      "exception": "org.springframework.beans.ConversionNotSupportedException",
      "message": "Failed to convert value of type 'java.lang.String' to required type 'com.htravel.tng.pe.resources.PojoParam'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [com.htravel.tng.pe.resources.PojoParam]: no matching editors or conversion strategy found",
      "path": "/rest/availability/test2"
  }
  </code></pre>
  
  <p>I have tried with @RequestPart too without succes.</p>
  
  <p>Any suggestions?</p>
  
  <p>Thank you.</p>