In this response, it includes all fields from jersey response class. How can i remove these field from my response and send only entity as a response object.

I have generated my interfaces and model classes using RAML. So internally it my response object extends jersey response class.

{
      "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"
        ]
      }
    }
0

There are 0 answers