title: How to set up my POJO so that jersey will populate private fields without the @JsonIgnoreProperites
body: <p>I'm trying to make a very basic client to get json replies from a restful interface using jersey/jackson.  I have little experience with either.  After some frustrating trial &amp; error trying to get my Pojo to populate I learned that it will only automatically populate a variable that doesn't have @JsonIgnoreProperties set if that variable is public.</p>
  
  <p>Now I want my responses I get back to be immutable, just to respect proper programming practices.  However, i don't want to have to add the @JsonIgnoreProperties annotation to ever single variable, that would grow frustrating.  Isn't there some easier way to tell the jackson to fill all variables, even private ones, if the variable name matches a json field.</p>
  
  <p>I don't know how it will work, but below is an example of my quick test code I was using when trying to set this up.  I had to write it by hand instead of copy/paste so forgive any typos please.</p>
  
  <p>My client:</p>
  
  <pre><code>Client client;
  
  public myClient(){
    DefaultClientConfig clientConfig=new DefaultClientConfig();
    ClientConfig.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING), true);
  
    client=Client.create(clientConfig);
  }
  
  
  getTest(){
     WebResource resource=client.resource(getTestURL());
     Object result=resource.accept(MediaType.APPLICATION_JSON).get(TestEntry.class);
     String stringResult=resource.accept(MediaType.APPLICATION_JSON).get(String.class);
  
     System.out.println("result: "+result);
     System.out.println("originalResult: "+result);
  }
  </code></pre>
  
  <p>the TestEntry class:</p>
  
  <pre><code> @JsonIgnoreProperties(ignoreUnknown=true)
   public clas TestEntry extends JsonEntry{
  
      @JsonProperty("type")
      String type;
      String rate
   }
  </code></pre>
  
  <p>The JsonEntry is a class with a Gson static object and a toString method which uses GSon to output the class as a json.  It also sets JsonIgnoreProperties to false, but it doesn't do anything else</p>
  
  <p>The output:</p>
  
  <pre><code>result: {"type":"typeValue"}
  originalResult: {"type": "typeValue", "rate": "rateValue"}
  </code></pre>
  
  <p>I've tried multiple attempts without success, including trying to create and load a contextResolver (which just made the type value also not work).  Is this really not a pretty way of doing this?</p>