这里我使用的是改版1.9,我必须在帖子请求中发布这个json。
{
"note": "",
"amount": "0",
"frequency": null,
"patient": "sameer_998oiib@innotical.com",
"doctor": "",
"date": "2016-04-27",
"reminder":
[
{
"days": [2],
"time": "06:29:00"
},
{
"days": [2, 3],
"time": "06:30:00"
}
],
"salt": "Abobotulinum Toxin A Injection",
"method": 2,
"unit": 1
}
提前致谢。
答案 0 :(得分:1)
只需创建一个像
的对象public class PostObject{
String note;
String amount;
String frequency;
String patient;
String doctor;
String date;
String salt;
int method;
int unit;
List<Reminder> reminder;
class Reminder{
List<Integer> days;
String time;
}
}
并设置您的请求正文对象