2 回答
TA贡献1835条经验 获得超7个赞
您可以发送一个只有Id键的对象,例如:
{
"firstName": "XYZ",
"middleName": "",
"lastName": "ABS",
"fullName": "XYZ ABS",
"gender": 0,
"dateOfBirth": "1987-03-05T07:49:33",
"maritalStatus": 1,
"jobTitle": { // here just pass object with Id key
"Id": "1"
},
"email": "demo@demo.com",
"phone": 12345678,
"mobile": 12345678,
"address": "84445 abc Hill",
"photo": "",
"isDeleted": false,
"createdOn": "2018-03-07T03:41:44",
"updatedOn": "2018-03-07T03:41:44"
}
TA贡献1995条经验 获得超2个赞
你可以这样做:
-edit:您在评论中说,我更新了答案。如果您不想使用 JSON 发送 JobTitle,只需删除该行。它将 NULL 映射为您的 JobTitle 对象。所以你可以在后端代码中处理它。
{
"firstName": "XYZ",
"middleName": "",
"lastName": "ABS",
"fullName": "XYZ ABS",
"gender": 0,
"dateOfBirth": "1987-03-05T07:49:33",
"maritalStatus": 1,
"email": "demo@demo.com",
"phone": 12345678,
"mobile": 12345678,
"address": "84445 abc Hill",
"photo": "",
"isDeleted": false,
"createdOn": "2018-03-07T03:41:44",
"updatedOn": "2018-03-07T03:41:44"
}
- 2 回答
- 0 关注
- 116 浏览
添加回答
举报