title: Jersey object's fromString method is not called
body: <p>This is a follow up question to this question:</p>
  
  <p><a href="https://stackoverflow.com/questions/30403033/passing-custom-type-query-parameter">Passing custom type query parameter</a></p>
  
  <p>I got a class which includes this method:</p>
  
  <pre><code>public static MyClass fromString(String json) 
  {
     Gson gson = new Gson();
     MyClass user = gson.fromJson(json, MyClass.class);
     return user;
  }
  </code></pre>
  
  <p>The full class:</p>
  
  <pre><code>public class MyClass
  {
      public String name;
      public PortalNameEnum  portalName;
      public PortalUserTypeEnum portalUserType;
      public String   notes;
  
  public MyClass(String name, PortalNameEnum portalName,
          PortalUserTypeEnum portalUserType, String notes)
  {
      super();
      this.portalName = portalName;
      this.portalUserType = portalUserType;
      this.name = name;
      this.notes = notes;
  }
  
  public static MyClass fromString(String json) 
  {
     Gson gson = new Gson();
     PortalUserInfo user = gson.fromJson(json, PortalUserInfo.class);
     return user;
  }
  
  public PortalNameEnum getPortalName()
  {
      return portalName;
  }
  
  public void setPortalName(PortalNameEnum portalName)
  {
      this.portalName = portalName;
  }
  
  public PortalUserTypeEnum getPortalUserType()
  {
      return portalUserType;
  }
  
  public void setPortalUserType(PortalUserTypeEnum portalUserType)
  {
      this.portalUserType = portalUserType;
  }
  
  public String getName()
  {
      return name;
  }
  
  public void setName(String name)
  {
      this.name = name;
  }
  
  public String getNotes()
  {
      return notes;
  }
  
  public void setNotes(String notes)
  {
      this.notes = notes;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I got a resource which got a method:</p>
  
  <pre><code>@Path("/myclasscall")
  @GET
  @UnitOfWork
  public String registerPortalUser(@Context HttpServletRequest req, @QueryParam("callback") String callback, @QueryParam("myclass") MyClass recordData) throws Throwable
  { .. }
  </code></pre>
  
  <p>It seems like the <code>fromString</code> method is not called and the resource method is always null, even though I see in the console the request itself and I do see a string that has been passed. Why is that?</p>