title: Jackson deserialization issue with final classes in Map
body: <p>I am using jackson in java to deserialize a json blob which is composed of a map of objects. But unfortunately my code is throwing an exception. </p>
  
  <p>I have the following data blow which I want to deserialize using Jackson:</p>
  
  <pre><code>"config": {
      "configItem1": {
          "0": {
              "valueBit": false,
              "valueInt": 0,
              "valueFloat": 0,
              "timestamp": "2016-10-05T13:44:04.223Z"
          },
          "1": {
              "valueBit": false,
              "valueInt": 0,
              "valueFloat": 0,
              "timestamp": "2016-10-05T13:44:04.223Z"
          }
      },
      "configItem2": {
          "0": {
              "valueBit": false,
              "valueInt": 0,
              "valueFloat": 0,
              "timestamp": "2018-03-15T11:39:47.550Z"
          }
      }
  }
  </code></pre>
  
  <p>And I have the following model class which I am trying to serialize into:</p>
  
  <pre><code>public class VehicleConfigValues {
  
      private final Boolean valueBit;
      private final Integer valueInt;
      private final Double valueFloat;
      private final DateTime valueDate;
      private final DateTime timestamp;
      private final String changedBy;
  
      public ConfigValues(Boolean valueBit, Integer valueInt, Double valueFloat, DateTime valueDate, DateTime timestamp, String changedBy) {
          this.valueBit = valueBit;
          this.valueInt = valueInt;
          this.valueFloat = valueFloat;
          this.valueDate = valueDate;
          this.timestamp = timestamp;
          this.changedBy = changedBy;
      }
  
      final static ConfigValues defaultConfig = new ConfigValues(false, 0, 0.0, null, null, null);
  
      public Boolean getValueBit() {
          return valueBit;
      }
  
      public Integer getValueInt() {
          return valueInt;
      }
  
      public Double getValueFloat() {
          return valueFloat;
      }
  
      public DateTime getValueDate() {
          return valueDate;
      }
  
      public DateTime getTimestamp() {
          return timestamp;
      }
  
      public String getChangedBy() {
          return changedBy;
      }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>public class Config {
  
      private Map&lt;String, Map&lt;Integer, ConfigValues&gt;&gt; config;
  
      public Config() {
  
      }
  
      public Config(Map&lt;String, Map&lt;Integer, ConfigValues&gt;&gt; config) {
          this.config = config;
      }
  
      public Map&lt;String, Map&lt;Integer, ConfigValues&gt;&gt; getConfig() {
          return config;
      }
  }
  </code></pre>
  
  <p>And I have the following main method calling the deserialization of the above blob into these classes:</p>
  
  <pre><code>public static void main(String[] args) {
  
          ObjectMapper mapper = new ObjectMapper();
  
          try {
  
              // Convert JSON string from file to Object
              Config user = mapper.readValue(new File("C:\\mConfig\\config.json"), Config.class);
              System.out.println(user);
  
          } catch (JsonMappingException e) {
              e.printStackTrace();
          } catch (IOException e) {
              e.printStackTrace();
          }
      }
  </code></pre>
  
  <p>But unfortunately I'm getting the following error:</p>
  
  <pre><code>org.codehaus.jackson.map.JsonMappingException: No suitable constructor found for type [simple type, class ConfigValues]: can not instantiate from JSON object (need to add/enable type information?)
   at [Source: C:\Config\config.json; line: 5, column: 17] (through reference chain: Config["config"])
  </code></pre>
  
  <p>Is anybody able to shed some light on this? I'm finding it difficult to debug why this deserialization is failing</p>