Retrofit 2 — Mock APIs with JsonServer

One frustrating element of our work life as Android developers is that we're often dependent of APIs. APIs can be unfinished, broken, or just slow, which all stall app development. It can be frustrating if we're trying to polish some UI elements, but cannot finish the work because of an unreliable API. We put up with these annoyances, because there is no alternative to use the real API, or is there?

In a previous tutorial, we've explored how to mock data with Retrofit, but that is cumbersome and not feasible with large datasets. In this tutorial, you'll learn an alternative with more capabilities and convenience: automatically mock a full API, including GET, POST, PUT, DELETE routes with minimal effort using the JSON server.

All you need is some sample data. It will take less than a couple of minutes to have your API running, promise! 🤘

Retrofit Series Overview


Continue reading

University Enrollment Required

Future Students benefit from value packed videos and tutorials.

Enroll to receive exclusive content or sign in if you’re already a Future Student.

Enroll me for $15/mo

Explore the Library

Find interesting tutorials and solutions for your problems.