title: Restful web service Json fields starting with capital names
body: <p>I build a restfulwebservice using Jackson &amp; gson  parsing in eclipse.</p>
  
  <p>My code is working fine if my starting letter of my input Json text is small i.e</p>
  
  <pre><code>{
    "fields":"value"
  
  }
  </code></pre>
  
  <p>it is returning a response message  like</p>
  
  <pre><code>{
    "fields":"value"
  
  }
  </code></pre>
  
  <p>but if my json text starts with a capital i.e</p>
  
  <pre><code>{
  
    "Ord_Num":"value"
  }
  </code></pre>
  
  <p>it is returning {} i.e null. (I used @JsonProperty("Ord_Num") String ordnum)</p>
  
  <p>Please find my gson parser and input parser file below.</p>
  
  <pre><code>@Path("/hello")
  public class Hello {
  @GET
  @Path("/response")
  @Consumes(MediaType.APPLICATION_JSON)
  public static Response getSampleResponse() {
      return Response.status(200).build();
  }
  
  @POST
  @Path("/send")
  public static Response postSampleResponse(SamplePojo sp) {
  
      Gson gson = new Gson();
      gson.toJson(sp);
      return Response.status(201).type(MediaType.APPLICATION_JSON)
              .entity(gson.toJson(sp)).build();
  
  }
  }
  </code></pre>
  
  <p>Sampplepojo.java:</p>
  
  <pre><code>public class SamplePojo {
  
  @JsonProperty("Ord_Num") String ordnum;
  
  public String getOrdnum() {
      return ordnum;
  }
  
  public void setOrdnum(String field) {
      this.ordnum = field;
  
  }
  }
  </code></pre>