title: TypeReference<Map<String, String>>() { }
body: <p>Since few days ago I started to work on a webservice project. This project is using <strong>Jackson</strong> to marshalling and unmarshalling <strong>JSON objects</strong>. So my question is:</p>
  
  <p>Why always I have to put the <code>{}</code> when I am creating an instance of <code>TypeReference</code>? I know the constructor is <code>protected</code>, but why is <code>protected</code>? I think that it's like a hack to make visible the constructor creating an implementation of the constructor since <code>TypeReference</code> is <code>abstract</code> and you can do it. But what is the point of this?</p>
  
  <pre><code>String jsonString = "{\" firstName\":\"John\",\"lastName\":\"Chen\"}";
  ObjectMapper objectMapper = new ObjectMapper();
  
  // properties will store name and value pairs read from jsonString
  Map&lt;String, String&gt; properties = objectMapper.readvalue(
      jsonString, new TypeReference&lt;Map&lt;String, String&gt;&gt;()
          { //
          });
  </code></pre>