title: How to map java object attribute(my_name) with json attribute (my-name)?
body: <p>I am using jackson json api to map json data to java objects. All is well in case of same object attribute names with json attributes. Now i have a situation where i am getting json data attribute with <code>-</code>. (my-name).</p>
  
  <p>In java we can't include <code>-</code> in variable names.</p>
  
  <pre><code>import org.codehaus.jackson.map.ObjectMapper;
  
  private static final ObjectMapper mapper = new ObjectMapper();
  
  User user = mapper.readValue("{my-name:\"abcd\"}", User.class);
  
  public class User {private String my_name; /*get-set methods*/}
  </code></pre>
  
  <p>Is there anything i need to apply in <code>User.class</code>.</p>
  
  <p>I don't want to change my code so much.</p>