title: How to exclude deserialization of objects from Json array within' GSON?
body: <p>In Android app I'm working with <a href="https://pokeapi.co/api/v2/" rel="nofollow noreferrer">"Pokemon API Service"</a>, where JSON-responses is parsed within' GSON library. In response I have the following array of pokemon's stats objects:</p>
  
  <pre><code>stats":[  
     {  
        "stat":{  
           "url":"https:\/\/pokeapi.co\/api\/v2\/stat\/6\/",
           "name":"speed"
        },
        "effort":2,
        "base_stat":90
     },
     {  
        "stat":{  
           "url":"https:\/\/pokeapi.co\/api\/v2\/stat\/5\/",
           "name":"special-defense",
  
        },
        "effort":0,
        "base_stat":50
     },
     {  
        "stat":{  
           "url":"https:\/\/pokeapi.co\/api\/v2\/stat\/4\/",
           "name":"special-attack"
        },
        "effort":0,
        "base_stat":50
     },
     {  
        "stat":{  
           "url":"https:\/\/pokeapi.co\/api\/v2\/stat\/3\/",
           "name":"defense"
        },
        "effort":0,
        "base_stat":40
     },
     {  
        "stat":{  
           "url":"https:\/\/pokeapi.co\/api\/v2\/stat\/2\/",
           "name":"attack"
        },
        "effort":0,
        "base_stat":55
     },
     {  
        "stat":{  
           "url":"https:\/\/pokeapi.co\/api\/v2\/stat\/1\/",
           "name":"hp"
        },
        "effort":0,
        "base_stat":35
     }
  ]
  </code></pre>
  
  <p>In my case I need only three last objects where nested stat objects have names "defense", "hp", "attack". I want to exclude from deserialization objects with "speed", "special-defence" and "special-attack", because I don't need this data. So I want to know: is possible do deserialize Json arrays selectivly or not? If the answer is yes how can I achieve this within GSON library?</p>
  
  <p>P.S.</p>
  
  <p>For this situation I've designed such POJO-classes:</p>
  
  <pre><code>public class Shocase {
    List&lt;StatsItem&gt; stats;
  }
  
  class StatsItem{
    private Stat stat;
    private int effort;
    private int baseStat;
  }
  
  class Stat{
    private String url;
    private String name;
  }
  </code></pre>