Ofir Bar
02/19/2020, 12:29 PMProfession that we send to our backend using Retrofit.
data class Profession (
@SerializedName("activeSince") var activeSince : Long?,
@SerializedName("name") var businessName : String?,
@SerializedName("description") var businessDescription : String?,
@SerializedName("licenseImageUrl") var licenseImageUrl : String?
)
Sometimes we send the entire object, but other times, I prefer to only send specific fields (for example, only the businessDescription and businessName ).
Is it possible to tell retrofit to not include the other 2 fields in the network request? (activeSince and licenseImageUrl).
Note: I can’t send activeSince and licenseImageUrl as null. Our backend will send me back errors if I attempt to do that