View Javadoc

1   package com.atlassian.plugins.rest.sample.entities;
2   
3   import javax.xml.bind.annotation.XmlAttribute;
4   import javax.xml.bind.annotation.XmlRootElement;
5   
6   import org.codehaus.jackson.annotate.JsonProperty;
7   
8   /**
9    * A fruit with a mix of JAXB and Jackson annotations. The Jackson annotations
10   * should take precedence when this resource is requested as JSON.
11   */
12  @XmlRootElement
13  public class JackFruit {
14      @JsonProperty("json-description")
15      @XmlAttribute(name = "jaxb-description")
16      public final String description;
17  
18      JackFruit(String description) {
19          this.description = description;
20      }
21  
22      public JackFruit() {
23          this("through Jersey");
24      }
25  }