I need to make a GET JSON API request with the following object inside data. When the request is made, new_password and new_password_confirmation are beeing sent as newPassword and newPasswordConfirmation. @Json(name) annotation is not working. Is this only for received jsons?
@JsonApi(type = "password_update")
data class UpdatePasswordDTO(
@Json(name = "password") val password: String?,
@Json(name = "new_password") val newPassword: String?,
@Json(name = "new_password_confirmation") val newPasswordConfirmation: String?
) : Resource() {
constructor() : this(null, null, null, null)
}
I need to make a GET JSON API request with the following object inside
data
. When the request is made,new_password
andnew_password_confirmation
are beeing sent asnewPassword
andnewPasswordConfirmation
. @Json(name) annotation is not working. Is this only for received jsons?