Add a mapping from Interface to Concrete type with Moshi and Kotlin
If you’re using Moshi for your JSON needs, you’ll eventually stumble upon the need to specify the concrete implementation of an interface. For example, you might have a contrived example such as: So how do we make sure the list of mammals in MammalList uses the concrete Human implementation? With a custom adapter! The implementation is simple – we just …