Jsonproperty Not Working While Minification Enabled
I have the following class class CodeRequest(@JsonProperty('phone') val phoneNumber: String) When I send request (using retrofit) with an object of this class as body (while minif
Solution 1:
Found solution a couple of minutes after posting the question.
The problem is not with proguard
nor jackson
, it's that Kotlin erases required data which are stored in kotlin.Metadata
.
Adding the following rule to proguard fixed the issue:
-keep class kotlin.Metadata { *; }
Post a Comment for "Jsonproperty Not Working While Minification Enabled"