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 th
change your Retrofit adapter code like this (I hope you're using retrofit2)
Gson gson = new GsonBuilder() .excludeFieldsWithoutExposeAnnotation() .create(); Retrofit retrofit = new Retrofit.Builder() .baseUrl(BASE_URL) .addConverterFactory(GsonConverterFactory.create(gson)) .build();