title: How to convert LinkedHashMap to Map<String, Object> in Java?
body: <p>I am trying to convert a Map to Map. 
  I have a json and Object :</p>
  
  <pre><code>{
          A: { availableInfo: { isAvailable : true} },
          VV: { availableInfo: { isAvailable : false} },
          B45: { availableInfo: { isAvailable : null} }
  }
  </code></pre>
  
  <p>And the Object :</p>
  
  <pre><code>@Builder
  @Getter
  @AllArgsConstructor
  @JsonIgnoreProperties(ignoreUnknown = true)
  public class AvailableInfo {
  
      @JsonProperty("isAvailable")
      private Boolean isAvailable;
  
      public AvailableInfo() {
      }
  }
  </code></pre>
  
  <p>I tried :</p>
  
  <pre><code>Map&lt;String, AvailableInfo&gt;  response = getResponse(query, Map.class);
  </code></pre>
  
  <p>But I am getting Error:</p>
  
  <pre><code>java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to AvailableInfo
  </code></pre>
  
  <p>Below is the getResponse() method :</p>
  
  <pre><code>private &lt;T&gt; T getResponse(final RestURI query, final Class&lt;T&gt; responseClass) throws IOException {
          T response = null;
  
          final RestResponse&lt;Record&gt; tempResponse = client.call(GET, query);
  
          if (isResponseOK(tempResponse, query)) {
              byte[] payloads = {};
  
              for (Record rec : tempResponse.getResponses()) {
                  final byte[] payload = rec.getPayload();
                  payloads = ArrayUtils.addAll(payloads, payload);
              }
              final Reader reader = newReader(payloads)
              response = jsonObjectMapper.readValue(reader, responseClass);
          }
  
          return response; //returns Map&lt;String, LinkedHashMap&gt;
      }
  </code></pre>
  
  <p>Any idea how it can be resolved? I tried changing the input json to :</p>
  
  <pre><code>   {
              A:  { isAvailable : true} ,
              VV:  { isAvailable : false} ,
              B45:  { isAvailable : null} 
      }
  </code></pre>
  
  <p>But still not working.</p>