I am using Retrofit to send and receive requests to my server.
I Have a model like below and I have to send it to my server but some variables in this model have not to send to the server.
public class SelectedListModel implements Serializable {
  @SerializedName("p_id")
  @Expose
  private Long pId;
  @SerializedName("p_qty")
  @Expose
  private Double pQty;
  @Expose(serialize = false , deserialize = false)
  private String pName; //Have not to send to server
  @Expose(serialize = false , deserialize = false)
  private String pPrice; //Have not to send to server
  @Expose(serialize = false , deserialize = false)
  private String pImageUrl; //Have not to send to server
}
and because of that, I am getting 400 in my responses from the server.
I used of @Expose(serialize = false, deserialize = false) in order to Ignore variables that have not to send to the server.
But it doesn't work.
Is there any way to do this or I have to create another model just for my server?
 
     
     
     
    