I am trying to parse following JSON using Firebase:
   {
          "organizations" : {
            "-KS5bLCjQmNSQZDIQkTE" : {
              "about" : {
                "address" : "teka",
                "city" : "sns",
                "country" : "South Africa",
                "created_at" : 1474358502482,
                "name" : "diverse",
                "pincode" : "167377",
                "state" : "punjab",
                "utc" : "2016-09-20 08:01:41"
              },
              "department" : {
                "-KS9LUpZWo5UqtWKJwJ8" : {
                  "address" : "best",
                  "name" : "test"
                }
              }
            }
          }
   }
Here is my Java code:
@IgnoreExtraProperties
public class Organizations  {
  About about;
  Department department;
   public String getDepartment() {
     return department;
   }
   public static class Department{
      public String address;
      public String name;
      public String getName() {
       return name;
      }
     public String getAddress() {
       return address;
     }
   }
}
FirebaseRecyclerAdapter
 fbOrganizationRecycleAdapter = new FirebaseRecyclerAdapter<Organizations, OrganizationHolder>
                (Organizations.class, R.layout.list_items_orgnization,OrganizationHolder.class,lastFifty) 
                {
                     @Override 
                     protected void populateViewHolder(OrganizationHolder viewHolder, final Organizations model, int position) {
                        Log.e(TAG, "test " + model.getDepartment().getName());
                     }
                };
Everything is parsing fine except Department. It's returning me null department when I am trying to get model.getDepartment().getName();.
If the data is like the following JSON, it works fine:
   {
          "organizations" : {
            "-KS5bLCjQmNSQZDIQkTE" : {
              "about" : {
                "address" : "teka",
                "city" : "sns",
                "country" : "South Africa",
                "created_at" : 1474358502482,
                "name" : "diverse",
                "pincode" : "167377",
                "state" : "punjab",
                "utc" : "2016-09-20 08:01:41"
              },
              "department" : {
                  "address" : "best",
                  "name" : "test"
              }
            }
          }
   }
I think the issue is with the ID. Please let me know how to parse ID "-KS9LUpZWo5UqtWKJwJ8" from the following JSON:
 "department" : {
            "-KS9LUpZWo5UqtWKJwJ8" : {
              "address" : "best",
              "name" : "test"
            }
          }