In Playframework (1.2.4) I am looking for a function similar to GSON’s @Expose annotation, where some fields may be excluded in the response (RenderXml). The XML response is a requirement else I would use the JSON.
In Playframework (1.2.4) I am looking for a function similar to GSON’s @Expose annotation,
Share
Totally forgot I had asked this question. Playframework 1 uses the XML library XStream and it has annotations similar to GSON’s @Expose annotation, but it is inverted. You have to exclude what you do not want to be shown in the response by using the annotation
@XStreamOmitField.A good tutorial can be found here.