I am trying to encode JSON object from Kotlin object:
class RequestData(val phone: String)
...
val requestJson = Gson().toJson(RequestData("79008007060"))
After encoding I am getting quoted string
"{\"phoneNumber\":\"\"}"
instead
{"phoneNumber":""}
Could you tell me why does it happen and how to fix it?