title: Deserializing non-string map keys with Jackson
body: <p>I have a a map that looks like this:</p>
  <pre><code>public class VerbResult {
      @JsonProperty(&quot;similarVerbs&quot;)
      private Map&lt;Verb, List&lt;Verb&gt;&gt; similarVerbs;
  }
  </code></pre>
  <p>My verb class looks like this:</p>
  <pre><code>public class Verb extends Word {
      @JsonCreator
      public Verb(@JsonProperty(&quot;start&quot;) int start, @JsonProperty(&quot;length&quot;) int length,
              @JsonProperty(&quot;type&quot;) String type, @JsonProperty(&quot;value&quot;) VerbInfo value) {
          super(length, length, type, value);
      }
      //...
  }
  </code></pre>
  <p>I want to serialize and deserialize instances of my VerbResult class, but when I do I get this error: <code>Can not find a (Map) Key deserializer for type [simple type, class my.package.Verb]</code></p>
  <p>I read online that you need to tell Jackson how to deserialize map keys, but I didn't find any information explaining how to go about doing this. The verb class needs to be serialized and deserialzed outside of the map as well, so any solution should preserve this functionality.</p>
  <p>Thank you for your help.</p>