title: Jackson excluding type information for containeirs (List, Map, Collection) during serialization
body: <p>In <strong>Jackson</strong> I want to include type-information for every custom objects. To accomplish this without annotation, I am using</p>
  
  <pre><code>OBJECT_MAPPER.enableDefaultTypingAsProperty(DefaultTyping.NON_FINAL, "@Ketan");
  </code></pre>
  
  <p>It is working but it is also including type-information for <code>List</code>, <code>Map</code>, <code>Collection</code> like container itself.</p>
  
  <p>Let me give you a standard example of <code>Animal</code>, <code>Dog</code>, <code>Cat</code> and <code>Zoo</code> hierarchy.</p>
  
  <pre><code>class Zoo {
  
      List&lt;Cat&gt; cats;
      Dog dog;
  
      public Dog getDog() {
         return dog;
      }
  
      public void setDog(Dog dog) {
         this.dog = dog;
      }
  
      public List&lt;Cat&gt; getCats() {
         return cats;
      }
  
      public void setCats(List&lt;Cat&gt; cats) {
         this.cats = cats;
      }
  
  }
  </code></pre>
  
  <p>Here, I have two custom objects, <code>Cat</code> and <code>Dog</code>. I just want to include type information for only those, but it is including for container – <code>List</code> in my case – as well.</p>
  
  <p>Please see below the JSON string I got by serialization.</p>
  
  <pre><code>{
      "@Ketan": "com.csam.wsc.enabling.core.codec.json.test.Zoo1",
      "cats": [
          // This line contains the issue //
          "java.util.ArrayList",
          [
              {
                  "@Ketan": "com.csam.wsc.enabling.core.codec.json.test.Cat",
                  "name": "animalName",
                  "likesCream": true,
                  "lives": 10
              },
              {
                  "@Ketan": "com.csam.wsc.enabling.core.codec.json.test.Cat",
                  "name": "animalName",
                  "likesCream": true,
                  "lives": 10
              }
          ]
      ],
      "dog": {
          "@Ketan": "com.csam.wsc.enabling.core.codec.json.test.Dog",
          "name": "animalName",
          "barkVolume": 0.0
      }
  }
  </code></pre>
  
  <p>Everything is fine to me except what I have highlighted – <code>java.util.ArrayList</code> in the JSON string. I do not want such a container type information.</p>
  
  <p>Is there any easy support at above API level itself to achieve this without overriding <code>TypeResolverBuilder</code> or any customization?</p>