title: Crashing on deserializing list from Firebase
body: <p>I have a model which contains a list.</p>
  
  <pre><code>class Group {
     List&lt;String&gt; members;
     // Other fields
  }
  </code></pre>
  
  <p>I'm inserting the whole model in Firebase using <code>databaseRef.setValue(group)</code>. Now it's being inserted properly in firebase but the problem arise when I try to add any new value in <code>members</code> field.</p>
  
  <p>I'm using <code>membersRef.push().setValue("newMember@gmail.com")</code> to add new field in members list on firebase.</p>
  
  <p>When <code>Group</code> object was created initially Firebase used "0", "1", etc as key but when I push() it creates a unique String as key.</p>
  
  <p>I'm creating the Java object back using this code:</p>
  
  <pre><code>groupReference.addListenerForSingleValueEvent(new ValueEventListener() {
       @Override
       public void onDataChange(DataSnapshot dataSnapshot) {
           Group group = dataSnapshot.getValue(Group.class);
       }
  
       @Override
       public void onCancelled(DatabaseError databaseError) {
  
       }
  });
  </code></pre>
  
  <p>Now the problem is when creating the <code>Group</code> class back from Firebase it tries to convert the <code>members</code> field in a <code>List</code> because it's key start from 0 but after some iteration there is a <code>String</code> key (something like "-KjTzYGRDZN99rBZfPDF") so it crashes trying to convert it to <code>List</code>.</p>
  
  <p>My Firebase object looks something like this:</p>
  
  <pre><code>Group
  |-----members
           |----0: "abc@gmail.com"
           |-----KjTzYGRDZN99rBZfPDF: "def@gmail.com"
  </code></pre>
  
  <p>I'm confused how do I solve this problem. How do I tell firebase to use unique key for List instead of 0, 1, 2, etc?</p>