To get started you need to include the following in your
Now you can set up your API interface with RxJava Observables, for example:
As you can see above, I can use my own data model and the JSON response will be converted automatically. I can also simply get a
JsonObject if I just want to use the JSON myself.
Alternatively, I can set up my own deserializer, like so:
Lastly, here is my API creation with a deserializer for the
User added in:
If You Enjoyed Reading, Please Click That Little Heart. If You Want To Read More Like This, Follow Me On Medium. Thanks!
Originally published at piercezaifman.com on June 10, 2017.