Does the Play Framework have a Native or Recommended way of converting Play models into XML/JSON? Something similar to JAXB or Jackson.

Some people recommend the template approach but this is very verbose and doesn't guarantee well-formed XML/JSON.

The Play Documentation on XML just shows an XML response being built using String concatenation like so:

return ok("<message \"status\"=\"OK\">Hello " + name + "</message>");

Similarly, the Play Documentation on JSON shows a JSON object being built up one line at a time.

ObjectNode result = Json.newObject();
result.put("status", "OK");
result.put("message", "Hello " + name);

Is there a Standard way of serializing Models into XML/JSON using Play?

Is there any Official Play Documentation on this subject?

Edit
Report