Swap Moshi for GSON to address Type erasure problems in network requests#157
Swap Moshi for GSON to address Type erasure problems in network requests#157michael-paystack merged 3 commits intomasterfrom
Conversation
|
SonarCloud Quality Gate failed. |
There was a problem hiding this comment.
So I see we moving away from Gson, can you provide a reason for this? This feels like a big change all of a sudden. Why was it working before and is not working anymore I guess is the question.
| google() | ||
| mavenCentral() | ||
| google() | ||
| jcenter() |
There was a problem hiding this comment.
Should we not be removing Jcenter? Do we need it for anything ?
There was a problem hiding this comment.
There are couple of libraries we haven't updated to versions shipped in MavenCentral. I'm reluctant to make those changes here but we can schedule them @Peter-John-paystack
There was a problem hiding this comment.
@Peter-John-paystack we're moving away from GSON because the new data access classes are all in Kotlin.
Because of Java's type erasure, GSON cannot resolve the return types for the retrofit service functions and it makes the service calls fail.
There was a problem hiding this comment.
Cool happy with the Jcenter, but why Moshi and not Kotlin serialisable just out of interest?
There was a problem hiding this comment.
It caused quite a number of conflicts with the kotlin version that was already in the project.
There was a problem hiding this comment.
Ok cool cool, lets just make sure that we are going to do regression testing on all functionality if we are making this change please. 😊








Fixes an issue from version 3.3.1 where network requests fail because of response parsing problems related to Java's type erasure.
This PR swaps GSON for Moshi for better compatibility with Kotlin