samedi 9 mai 2015

Retrofit - get some parameters from callback without creating a POJO

I'm using retrofit and in my response i get this json:

{
   'email':'some@email.com',
   'is_valid':'0'
}

I know that i can create a class with these fields and ask for retrofit to map and deserialize it as object with

someMethod(callback<ThatClass> callback)

but i want to know if i can have these field as some variables directly in my callback and not with POJO creation?

like this:

someMethod(callback<String email, int is_valid> callback)

Aucun commentaire:

Enregistrer un commentaire