title: rest service post method get json as class unknown properties
body: <p>i have a error with the service when i get json as my model class,
  if my model field have public then no problem everything works fine, but if private and getters and setters then have problem can't understand my model as json.</p>
  
  <p>this is my service class:   </p>
  
  <pre><code> @POST
      @Path("/test")
      @Produces("application/json")
      @Consumes("application/json")
      public LoginResponse loginVTS(Login login) throws Exception { 
           ......
  
      }
  </code></pre>
  
  <p>model : </p>
  
  <pre><code>  @JsonIgnoreProperties(ignoreUnknown = true)
  public class Login {
  
      private String UserId;
  
      private String Password;
  
  
      public Login() {}
  
  
      public String getUserId() {
          return UserId;
      }
  
      public void setUserId(String userdId) {
          UserId = userdId;
      }
  
      public String getPassword() {
          return Password;
      }
  
      public void setPassword(String password) {
          Password = password;
      }
  
      @Override
      public String toString() {
          return "Login{" +
                  "UserId='" + UserId + '\'' +
                  ", Password='" + Password + '\'' +
                  '}';
      }
  }
  </code></pre>
  
  <p>pom.xml dependency:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.jboss.resteasy&lt;/groupId&gt;
      &lt;artifactId&gt;resteasy-client&lt;/artifactId&gt;
      &lt;version&gt;3.0.4.Final&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.jboss.resteasy&lt;/groupId&gt;
      &lt;artifactId&gt;resteasy-jackson-provider&lt;/artifactId&gt;
      &lt;version&gt;3.0.4.Final&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  
  
  
  &lt;dependency&gt;
      &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
      &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
      &lt;version&gt;2.2.3&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>if i use private fields and getters,setters then when client call my service throw this error : </p>
  
  <pre><code>Failed executing POST /rest/test: org.jboss.resteasy.spi.ReaderException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "UserId" (Class ge.georgiancard.vts.model.Login), not marked as ignorable
   at [Source: org.apache.catalina.connector.CoyoteInputStream@547c57f3; line: 1, column: 12] (through reference chain: ge.georgiancard.vts.model.Login["UserId"])
      at org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:202) [resteasy-jaxrs-2.3.2.Final.jar:]
      at org.jboss.resteasy.core.MethodInjectorImpl.injectArguments(MethodInjectorImpl.java:124) [resteasy-jaxrs-2.3.2.Final.jar:]
      at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:147) [resteasy-jaxrs-2.3.2.Final.jar:]
      at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257) [resteasy-jaxrs-2.3.2.Final.jar:]
      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222) [resteasy-jaxrs-2.3.2.Final.jar:]
      at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211) [resteasy-jaxrs-2.3.2.Final.jar:]
      at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525) [resteasy-jaxrs-2.3.2.Final.jar:]
      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502) [resteasy-jaxrs-2.3.2.Final.jar:]
      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.3.2.Final.jar:]
      at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.2.Final.jar:]
      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.2.Final.jar:]
      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.2.Final.jar:]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
      at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
      at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
  Caused by: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "UserId" (Class ge.georgiancard.vts.model.Login), not marked as ignorable
   at [Source: org.apache.catalina.connector.CoyoteInputStream@547c57f3; line: 1, column: 12] (through reference chain: ge.georgiancard.vts.model.Login["UserId"])
      at org.codehaus.jackson.map.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:53)
      at org.codehaus.jackson.map.deser.StdDeserializationContext.unknownFieldException(StdDeserializationContext.java:267)
      at org.codehaus.jackson.map.deser.std.StdDeserializer.reportUnknownProperty(StdDeserializer.java:649)
      at org.codehaus.jackson.map.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:635)
      at org.codehaus.jackson.map.deser.BeanDeserializer.handleUnknownProperty(BeanDeserializer.java:1355)
      at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:717)
      at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:580)
      at org.codehaus.jackson.map.ObjectMapper._readValue(ObjectMapper.java:2695)
      at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1308)
      at org.codehaus.jackson.jaxrs.JacksonJsonProvider.readFrom(JacksonJsonProvider.java:419)
      at org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:105) [resteasy-jaxrs-2.3.2.Final.jar:]
      at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.read(GZIPDecodingInterceptor.java:61) [resteasy-jaxrs-2.3.2.Final.jar:]
      at org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:108) [resteasy-jaxrs-2.3.2.Final.jar:]
      at org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:169) [resteasy-jaxrs-2.3.2.Final.jar:]
  </code></pre>
  
  <p>can anyone help me how i fix this problem..</p>