title: Using JAXB annotations with RestEasy
body: <p>I'm trying to use JAXB annotations with RestEasy in order to choose names and elements order in my JSON output.</p>
  
  <p>Somehow, it isn't working, even if the RestEasy doc says it's possible.</p>
  
  <p>Here some code:</p>
  
  <pre><code>@XmlRootElement(name = "translation")
  @XmlAccessorType(XmlAccessType.FIELD)
  @XmlType(name = "translation", propOrder = {
      "key",
      "value"
  })
  public class TranslationDTO {
  
    public TranslationDTO() {}
    public TranslationDTO(Translation translation) {
      setKey(translation.getTranslationKey().getValue());
      setValue(translation.getContent());
      //setCreationDate(translation.getCreatedTimestamp());
    }
  
    @XmlElement(name = "key")
      private String key;
  
    @XmlElement(name = "value")
      private String value;
  
      //private Date creationDate;
  
      @XmlElement(name = "key")
      public String getKey() {
      return key;
    }
  
      public void setKey(String key) {
      this.key = key;
    }
  
      @XmlElement(name = "value")
      public String getValue() {
      return value;
    }
  
      public void setValue(String value) {
      this.value = value;
    }
  
      /*@XmlElement(name = "creationDate")
      public Date getCreationDate() {
      return creationDate;
    }
  
      public void setCreationDate(Date creationDate) {
      this.creationDate = creationDate;
    }*/
  
  }
  </code></pre>
  
  <p>And here an example output:</p>
  
  <pre><code>{
      "name":"i18nhelp",
      "currentVersion":"1",
      "currentTotalKeys":28,
      "oldTotalKeys":0,
      "totalLanguages":2,
      "languageDtos":[{
          "name":"Anglais",
          "iso639":"en",
          "totalCurTrans":28,
          "newCurTrans":28,
          "oldTrans":0
      },
      {
          "name":"Français",
          "iso639":"fr",
          "totalCurTrans":28,
          "newCurTrans":28,
          "oldTrans":0
      }]
  }
  </code></pre>
  
  <p>The JAXB annotations don't seem to be taken in account at all.</p>
  
  <p>Any idea will be considered...</p>