title: Jackson Deserialize Key/Value List into List<Class>
body: <p>I have a response from web service call like this</p>
  
  
  
  <pre><code>// other key/values
  properties: {
     1000:true
     2000:false
     2939:true
     ...
  }
  // other key/values
  </code></pre>
  
  <p>I want to deserialize it to a POJO List which is </p>
  
  <pre class="lang-java prettyprint-override"><code>public class Service implements Serializable {
     private Integer id;
     private Boolean readOnly;
     ...
  }
  </code></pre>
  
  <p>So far i have tried </p>
  
  <pre class="lang-java prettyprint-override"><code>ObjectMapper mapper = new ObjectMapper();
  user.setServices(mapper.convertValue(response.getProperties(), Service.class));
  </code></pre>
  
  <p>But it doesn't convert map directly to the List. How do i achieve this? Here are the details:</p>
  
  <p>Where response.getProperties() returns </p>
  
  <pre class="lang-java prettyprint-override"><code>@JsonAnyGetter
  public Map&lt;Integer, Boolean&gt; getProperties() {
      return properties;
  }
  </code></pre>
  
  <p>And user.setServices </p>
  
  <pre class="lang-java prettyprint-override"><code>public void setServices(List&lt;Service&gt; services) {
          this.services = services;
      }
  </code></pre>