title: Using JsonAnySetter and JsonAnyGetter with ArrayList within Hashmap
body: <p>So I'm trying to get my head around using Jackson Annotations, and i'm making requests against Riot's API. This is the response I'm getting: <a href="http://jsonblob.com/568079c8e4b01190df45d254" rel="nofollow">http://jsonblob.com/568079c8e4b01190df45d254</a>. Where the array after the summonerId (38584682) can be of a varying length. </p>
  
  <p>The unique summoner ID will be different every single time too.</p>
  
  <p>I want to map this response to a DTO.</p>
  
  <p>For a similar situation with a different call I am doing:</p>
  
  <pre><code>@JsonIgnore
  protected Map&lt;String, SingleSummonerBasicDTO&gt; nonMappedAttributes;
  
  @JsonAnyGetter
  public Map&lt;String, SingleSummonerBasicDTO&gt; getNonMappedAttributes() {
      return nonMappedAttributes;
  }
  
  @JsonAnySetter
  public void setNonMappedAttributes(String key, SingleSummonerBasicDTO value) {
      if (nonMappedAttributes == null) {
          nonMappedAttributes = new HashMap&lt;String, SingleSummonerBasicDTO&gt;();
      }
      if (key != null) {
          if (value != null) {
              nonMappedAttributes.put(key, value);
          } else {
              nonMappedAttributes.remove(key);
          }
      }
  }
  </code></pre>
  
  <p>From an answer on here. my thinking is to do a for-each loop for each of the elements in the array, but I don't know how to loop over something without having something to loop over.</p>
  
  <p>I am completely stuck as to how the annotations work and how to proceed, any help if appreciated!</p>