Sending Data in Body in retrofit kotlin
I am using retrofit for calling the API i have to send the data in Body as we send in Java @Body but don't know how to parse the data...
{
"appType": "EXTERNAL",
"appDetails":{
"os": "MAC_OSX",
"osVersion": "1.2",
"appVersion": "1.0",
"deviceFamily": "MOBILE",
"ipAddress": "192.168.5.2"
},
"consumerSections":[
"Support",
"English",
"other"
],
"engagementAttributes": [
{
"type": "personal",
"personal": {
"contacts": [{"email":"test.com","phone":"12345678"},{"email":"test2.co.il","phone":"98765430"}],
"age": {
"age":30.0,
"year":1985,
"month":7,
"day":22
},
"firstname": "test",
"lastname": "test2",
"gender": "FEMALE",
"company": "liveperson"
}
}
]
}
in the API call, how can i parse it and send data to the server. Please tell....