title: Java Object extending a list to Json with Jackson
body: <p>I want to convert a object that is extending a list to Json using Jackson. 
  Example:</p>
  
  <pre><code>public class TryToSerialize extends ArrayList&lt;String&gt;
  {
      private int number;
      private String word;
  
      public TryToSerialize(){
          number = 0;
          word = "";
      }
  
      @JsonProperty
      public int getNumber() {
          return number;
      }
  
      public void setNumber(int number) {
          this.number = number;
      }
      @JsonProperty
      public String getWord() {
          return word;
      }
  
      public void setWord(String word) {
          this.word = word;
      }
  
      @JsonIgnore
      public String getAsJSON() throws IOException {
          ObjectMapper mapper = new ObjectMapper();
          mapper.writeValue(new File("c:\\tts.json"), this);
          return mapper.writeValueAsString(this) ; 
      }
  }
  </code></pre>
  
  <p>When I do serialize this I will only get the Array portion.</p>
  
  <pre><code>    TryToSerialize tts = new TryToSerialize();
      tts.setNumber(10);
      tts.setWord("Working");
      tts.add("first");
      tts.add("second");
      tts.add("third");
      String json = tts.getAsJSON();
  </code></pre>
  
  <p>Json:</p>
  
  <pre><code>["first","second","third"]
  </code></pre>
  
  <p>I am looking for a way to include the other variables of the object.</p>