Well, I've being struggling with Firebase response using the REST API response. The thing is I don't want to use Android's libs for Firebase and instead use raw rest api. Long story short, the response from Firebase is:
{
"object1": {
"param1": true,
"param2": "05",
"param3": "String",
},
"object2": {
"param1": true,
"param2": "09",
"param3": "String",
}
}
Run Code Online (Sandbox Code Playgroud)
Retrofit interface:
public interface ApiCalls {
@GET("/objects.json")
Observable<List<MyObject>> getObjects();
}
Run Code Online (Sandbox Code Playgroud)
Gson Builder, Retrofit Builder and RxJava:
Gson gson = new GsonBuilder()
.setLenient() …Run Code Online (Sandbox Code Playgroud)