title: Can not construct instance of `java.util.LinkedHashMap` (although at least one Creator exists)
body: <p>I'm loading properties from a json file and creating datasource builder in spring boot app. But when I try to update the values into json file, I'm getting the error <strong>[Cannot construct instance of <code>java.util.LinkedHashMap</code> (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value]</strong>. Please find below code and help me out in this.</p>
  
  <p>I have used "PropertySource" annotation for a class to load data from a json. I'm trying update those values into json file using ObjectMapper. </p>
  
  <h2>1. JsonProperties.class (class for json)</h2>
  
  <pre><code>@Configuration
  @PropertySource(value = "classpath:/config/database_config.json", factory = JsonPropertySourceFactory.class)
  @ConfigurationProperties
  public class JsonProperties {
  
      private String ip;
      private String port;
  
          //getters and setters
  }
  </code></pre>
  
  <h2>2. JsonPropertySourceFactory.class (parser)</h2>
  
  <pre><code>public class JsonPropertySourceFactory implements PropertySourceFactory {
  
      @SuppressWarnings("unchecked")
      @Override
      public PropertySource&lt;?&gt; createPropertySource(String name, EncodedResource resource) throws IOException {
          @SuppressWarnings("rawtypes")
          Map readValue = new ObjectMapper().readValue(resource.getInputStream(), Map.class);
          return new MapPropertySource("json-property", readValue);
      }
  
  }
  </code></pre>
  
  <h2>3. database_config.json (data)</h2>
  
  <pre><code>{
      "ip": "1.1.1.1",
      "port": "3306",
  }
  </code></pre>
  
  <h2>4. Trying to update json file dynamically</h2>
  
  <pre><code>ObjectMapper mapper = new ObjectMapper();
  try {
      mapper.writeValue(new ClassPathResource("configuration/database_config.json").getFile(), dataBaseJsonProperties);
  } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  }
  </code></pre>
  
  <p>I'm trying to update the database info in json file and restart the application by looking into json file again to check database.</p>