Ankit Dubey
06/24/2021, 7:02 AMval query = hashMapOf<String,Any>(
KEY_OTP to otp.toInt(),
KEY_MOBILE to phone
)
This is what I’ve posted
However I achieved the excepted result by sending a model class as
@Serializable
data class OTPRequest(
val mobile : String,
val otp : Int
)
But I was wondering, It’ll be a extra burden if I’m going to create multiple request classes
Any solution will be helpful.
thanksrnett
06/24/2021, 9:04 PMJsonObject
from kotlinx serialization.Ankit Dubey
06/25/2021, 7:15 AM