【发布时间】:2019-01-10 18:33:59
【问题描述】:
我正在使用改造来调用 API 我必须在 Body 中发送数据,就像我们在 Java @Body 中发送一样,但不知道如何解析数据...
{
"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"
}
}
]
}
在 API 调用中,我如何解析它并将数据发送到服务器。 请告诉....
【问题讨论】: