title: Deserializing JSON Array of Object Using Restlet/Jackson
body: <p>I am using Restlet to call an API that returns a JSON Array of objects.  When making a similar call to pull back a single object, everything gets mapped correctly to the custom class, but when I pull back the array the Object is getting mapped as a LinkedHashMap instead of this custom object.  I'm sure I just need to define how to deserialize the array correctly, but I haven't figured out exactly how to do that.</p>
  
  <pre><code>@Get("json")
  public Trait getTrait();
  
  @Get("json")
  public HashSet&lt;Trait&gt; getTraits();
  </code></pre>
  
  <p>The former works fine, but the latter isn't work.  Ultimately when I try to iterate through the HashSet I can this error:  java.util.LinkedHashMap cannot be cast to com.test.traits.Trait.</p>
  
  <p>Any help would be appreciated.</p>