title: How to receive json object in the RESTful (WEB SERVICE) POST method in Java
body: <p>It may be bit silly question, but I am confuse if it is possible to receive the JSON Objects in the @FormParam in the POST method under RESTful webservice </p>
  
  <pre><code>@POST
  @Produces(MediaType.APPLICATION_JSON)
  @Consumes(MediaType.APPLICATION_JSON)
  @Path("/fetch/")
  public List&lt;MyObject&gt; getCandidate(@FormParam("CodeList")
  List&lt;String&gt; codeList)
  {
      List&lt;MyObject&gt; myobjects = null;
      try {
          //some code
      } catch (Exception e) {
          //some exception if occur 
      }
      return myobjects;
  }
  </code></pre>
  
  <p>And what if I want to get the userdefine object in the form param. </p>
  
  <pre><code>@POST
  @Produces(MediaType.APPLICATION_JSON)
  @Consumes(MediaType.APPLICATION_JSON)
  @Path("/fetch/")
  public List&lt;MyObject&gt; getCandidate(@FormParam("CodeList")
  List&lt;MyObject&gt; formMyObjectList)
  {
      List&lt;MyObject&gt; myobjects = null;
      try {
          //some code
      } catch (Exception e) {
          //some exception if occur 
      }
      return myobjects;
  }
  </code></pre>
  
  <p>Thanks in advance.</p>