Conclusion

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

You learned a lot about Moshi and its integration with Retrofit in this lesson. The key takeaways are:

  • Use Moshi to parse JSON in your Android apps.
  • Moshi generates adapters for your custom data types if you annotate them with @JsonClass (generateAdapter = true).
  • You connect Moshi to Retrofit if you add the Moshi converter factory.
  • The converter allows Retrofit to automatically parse your requests and responses.

In the next lesson, you’ll refactor your networking code to work with Kotlin coroutines. This will make the code much more readable and easier to grasp.

See forum comments
Download course materials from Github
Previous: Demo 2 Next: Quiz: Parse JSON with Moshi