I have the following for debug purposes:
debug {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
I have a class MyClass, and I'm using Gson to convert it to JSON before sending it to my server. While I expect the JSON to be {"name":"blah", "age": 40}
, the server receives it as {"a":"blah", "b": 40}
. I tried several things in the proguard rule files but to no avail. Here is an example of my latest try:
-keep public class com.package.package.MyClass { *; }
What am I missing? Thanks
Have you tried serialization annotation