title: Having ClassCastException when retrieving data from firebase
body: <p><strong>I am making an android app which is using Firebase realtime database when i retrieving data i get an ClassCastException: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map</strong></p>
  
  <p><strong>Here is my Java Code</strong></p>
  
  <pre><code> mref.addChildEventListener(new ChildEventListener() {
                      @Override
                      public void onChildAdded(DataSnapshot dataSnapshot, String s) {
                          Map&lt;String, Object&gt; newPost = (Map&lt;String, Object&gt;) dataSnapshot.getValue();
                          System.out.println("First Name: " + newPost.get("FirstName"));
                          System.out.println("Last Name: " + newPost.get("LastName"));
                      }
  
                      @Override
                      public void onChildChanged(DataSnapshot dataSnapshot, String s) {
  
                      }
  
                      @Override
                      public void onChildRemoved(DataSnapshot dataSnapshot) {
  
                      }
  
                      @Override
                      public void onChildMoved(DataSnapshot dataSnapshot, String s) {
  
                      }
  
                      @Override
                      public void onCancelled(FirebaseError firebaseError) {
  
                      }
                  });
  </code></pre>
  
  <p><strong>Here is a logcat</strong></p>
  
  <pre><code>Process: com.firebasedemo, PID: 10509
      java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map
              at com.firebasedemo.MainActivity$1$2.onChildAdded(MainActivity.java:75)
              at com.firebase.client.core.ChildEventRegistration.fireEvent(ChildEventRegistration.java:48)
              at com.firebase.client.core.view.DataEvent.fire(DataEvent.java:45)
              at com.firebase.client.core.view.EventRaiser$1.run(EventRaiser.java:38)
              at android.os.Handler.handleCallback(Handler.java:733)
              at android.os.Handler.dispatchMessage(Handler.java:95)
              at android.os.Looper.loop(Looper.java:136)
              at android.app.ActivityThread.main(ActivityThread.java:5001)
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:515)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
              at dalvik.system.NativeStart.main(Native Method)
  </code></pre>