在此回复中,它包含泽西响应类的所有字段。如何从我的响应中删除这些字段并仅将实体作为响应对象发送。
我使用RAML生成了我的接口和模型类。所以内部我的响应对象扩展了泽西响应类。
{
"length": -1,
"language": null,
"location": null,
"allowedMethods": [],
"metadata": {
"Content-Type": [
"application/json"
]
},
"mediaType": {
"type": "application",
"subtype": "json",
"parameters": {},
"wildcardType": false,
"wildcardSubtype": false
},
"status": 200,
"date": null,
"headers": {
"Content-Type": [
"application/json"
]
},//Response obj
"entity": {
"user": "abcd",
"password": "xyz123",
"group": "mail"
},
"lastModified": null,
"cookies": {},
"links": [],
"statusInfo": "OK",
"entityTag": null,
"stringHeaders": {
"Content-Type": [
"application/json"
]
}
}