I have a requirement of a response from jersey controller where name and type of the properties in response are returned from and external service and are not fixed, So I am thinking to return HashMap<String, Object>. Can we return HashMap<String, Object> from jersey JSR-311 resource as response. Or any other solution for it.
Sample Response looks like:
@XmlType
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
MyResponse{
@XmlElement
String id;
@XmlElement
HashMap<String, Object> properties;
}