I have the following JSON where the parameter "-LCxUVIOiLT4TUM4Os3U" and "-LCxUVMI85eea0kISlc5" is a dynamic parameter, ie it is never the same parameter name (it is an ID of the Firebase Realtime Database database)
{
  "compliant" : {
    "emails" : {
      "-LCxUVIOiLT4TUM4Os3U" : {
        "date" : "2018-05-19T20:35:23.483Z",
        "email" : "test@hotmail.com",
        "messageId" : "d39126a2-29b0-5702-b0a5-75d8a57b0a1d",
        "notificationType" : "Complaint"
      },
      "-LCxUVMI85eea0kISlc5" : {
        "date" : "2018-05-19T12:00:10.527Z",
        "email" : "test2@hotmail.com",
        "messageId" : "5b2ee1af-87c0-5aa3-ace3-b2d593ca7cb3",
        "notificationType" : "Complaint"
      }
    }
  }
}
How can I manipulate this parameter and deserialize it in a JAVA Object?
I have done several tests, but none with a positive result.
Note: I'm using Gson.
Updated Class:
package tv.zoome.integration.data;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Email {
@SerializedName("date")
@Expose
private String date;
@SerializedName("email")
@Expose
private String email;
@SerializedName("messageId")
@Expose
private String messageId;
@SerializedName("notificationType")
@Expose
private String notificationType;
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getMessageId() {
return messageId;
}
public void setMessageId(String messageId) {
this.messageId = messageId;
}
public String getNotificationType() {
return notificationType;
}
public void setNotificationType(String notificationType) {
this.notificationType = notificationType;
}
}
 
    