title: Google GSON nested HashMaps deserialization
body: <p>In my current project i use GSON library in android, and i've faced a problem of nested Maps deserializtion. This is how initial json looks like </p>
  
  <pre><code> {
  
  "5":{
      "id":5,
      "name":"initial name",
      "image_url":"uploads/71d44b5247cc1a7c56e62fa51ca91d9b.png",
      "status":"1",
      "flowers":{
          "7":{
              "id":7,
              "category_id":"5",
              "name":"test",
              "description":"some description",
              "price":"1000",
              "image_url":"uploads/test.png",
              "status":"1",
              "color":"red",
  
          }
      }
    }
   }
  </code></pre>
  
  <p>And my pojo's</p>
  
  <pre><code>class Category {
  long id;
  String name;
  String image_url;
  HashMap&lt;String,Flower&gt; flowers;
  }
  </code></pre>
  
  <p>And Flower class</p>
  
  <pre><code>class Flower {
  long id;
  String category_id;
  String name;
  String description;
  String price;
  String image_url;
  String status;
  }
  </code></pre>
  
  <p>But when i try to deserialize this objects, i can access nested hashmaps, the example code is </p>
  
  <pre><code>public class TestJson {
  public static void main(String[] args) {
    Gson gson = new Gson();
      try {
      BufferedReader br = new BufferedReader(
          new FileReader("2.txt"));
      HashMap&lt;String,Category&gt; map = gson.fromJson(br, HashMap.class);
      Collection&lt;Category&gt; asd = map.values();
              System.out.println(map.values());
  
         } catch (IOException e) {
          e.printStackTrace();
         }
  
      }
   }
  </code></pre>
  
  <p>Any suggestions?</p>