Am trying to increase security to my request payload, one of the measures is encrypting or blurring the member key of my json this way it's more ambiguous...
Here is what am trying to do,
public class LoginRequest {
private static final String SERIALIZED_NO = BuildConfig.DEBUG ? "no": "xyz";
private LoginRequest() {
// This class is not publicly instantiable
}
public static class ServerLoginRequest extends ParentRequest {
@Expose
@SerializedName(SERIALIZED_NO)
private String no;
Here is an image of my code...
Now the error is that this, @SerializedName(SERIALIZED_NO)
must be a constant
i read some articles but no luck so far i think there is no way of conditional annotation like in C#, btw, of course, i can handle this with my back end since its not java, in some smart way.