Of course, Retrofit can just deserialize HTTP bodies into OkHttp's ResponseBody type and it can acknowledge its RequestBody type for @Body.
Converters can be added in order to support different sorts. Seven kinds of modules adjust mainstream serialization libraries for your benefit. These include the following libraries:
- Gson: com.squareup.retrofit2:converter-gson
- Jackson: com.squareup.retrofit2:converter-jackson
- Moshi: com.squareup.retrofit2:converter-moshi
- Protobuf: com.squareup.retrofit2:converter-protobuf
- Wire: com.squareup.retrofit2:converter-wire
- Simple XML: com.squareup.retrofit2:converter-simplexml
- Scalars (primitives, boxed, and String): com.squareup.retrofit2:converter-scalars