title: How to map Json Object with Hyphen to Java Object
body: <p>We are integrating Restful webservice in existing application which uses IBM Websphere application server(RAD 7) and compiler is 5.0.</p>
  
  <p>Now i have a situation where i am getting json data attribute with -. (my-name).
  I am using jackson json api (using jersey jar files 1.2 as it is Java 5) to map json data to java objects.</p>
  
  <p>Tried using <code>@JsonProperty</code> to get the corresponding JSON property. Object is getting initialized but property value is null.</p>
  
  <pre><code>class Person {
  
      @JsonProperty("first-name")
      private String firstName;
  
      @JsonProperty("last-name")
      private String lastName;
  
  }
  </code></pre>
  
  <p>No exception but firstname and lastname value is null or empty.</p>