title: How to deserialize json string into object
body: <pre><code>{
     "LocalLocationId [id=1]":{
        "type":"folderlocation",
        "id":{
           "type":"locallocationid",
           "id":1
        },
        "parentId":{
           "type":"locallocationid",
           "id":0
        },
        "name":"Test",
        "accessibleToUser":true,
        "defaultLocation":false,
        "timezoneId":"Asia/Calcutta",
        "children":[]
     },
     "LocalLocationId [id=0]":{
        "type":"folderlocation",
        "id":{
           "type":"locallocationid",
           "id":0
        },
        "parentId":null,
        "name":"Locations",
        "accessibleToUser":false,
        "defaultLocation":false,
        "timezoneId":"Asia/Calcutta",
        "children":[{
           "type":"locallocationid",
           "id":1
        }]
     },
     "allAllowedChildren":[{
        "type":"locallocationid",
        "id":1
     }]
  }
  </code></pre>
  
  <p>How to deserialize above string into java object.</p>
  
  <p>Class im using is</p>
  
  <pre><code>public class Tree {
  
      @SerializedName("allAllowedChildren")
      private List&lt;Id&gt; allAllowedChildren;
  
      @SerializedName("LocalLocationId")
      private Map&lt;String, LocalLocationId&gt; localLocationId;
  
      public class LocalLocationId {
          @SerializedName("type")
          private String type;
  
          @SerializedName("name")
          private String name;
  
          @SerializedName("accessibleToUser")
          private boolean accessibleToUser;
  
          @SerializedName("defaultLocation")
          private boolean defaultLocation;
  
          @SerializedName("timezoneId")
          private String timezoneId;
  
          @SerializedName("id")
          private Id id;
  
          @SerializedName("parentId")
          private Id parentId;
  
          @SerializedName("children")
          private List&lt;Id&gt; children;
  
          public String getType() {
              return type;
          }
          public String getName() {
              return name;
          }
          public boolean isAccessibleToUser() {
              return accessibleToUser;
          }
          public boolean isDefaultLocation() {
              return defaultLocation;
          }
          public String getTimezoneId() {
              return timezoneId;
          }
          public Id getId() {
              return id;
          }
          public Id getParentId() {
              return parentId;
          }
          public List&lt;Id&gt; getChildren() {
              return children;
          }
      }
  
      public class Id {
          private String type;
          private Integer id;
  
          public String getType() {
              return type;
          }
          public Integer getId() {
              return id;
          }
      }
  
      public List&lt;Id&gt; getAllAllowedChildren() {
          return allAllowedChildren;
      }
      public Map&lt;String, LocalLocationId&gt; getLocalLocationId() {
          return localLocationId;
      }
  }
  </code></pre>