title: Kotlin: objectmapper.readValue() with TypeReference<HashMap<String, String>> cannot infer parameter
body: <p>I would like to deserialize a json to Map with objectmapper with the following code:</p>
  
  <pre><code>fun onMessage(topic: String, message: MqttMessage) {
     val typeRef = object : TypeReference&lt;HashMap&lt;String, String&gt;&gt;() {}
     val msg = objectMapper.readValue(message.payload, typeRef)
     ...
  }
  </code></pre>
  
  <p>Compiler says it connot infer parameter T in <code>fun &lt;T : Any!&gt; readValue (src: ByteArray!, valueTypeRef: (TypeReference&lt;Any!&gt;..TypeReference&lt;*&gt;?)): T!</code></p>
  
  <p>Is there any solution to this problem whitout extending a HashMap with my custom class like this:</p>
  
  <pre><code>class MyHashMap : HashMap&lt;String, String&gt;()
  </code></pre>
  
  <p>...</p>
  
  <pre><code>fun onMessage(topic: String, message: MqttMessage) {
     val msg = objectMapper.readValue(message.payload, MyHashMap::class.java)
     ...
  }
  </code></pre>