9.3.2 JPA database resource interface specifics
The JpaRestlet provides the JPA database resources. It implements the common
All resources have three representations:
- application/json: a json representation
- text/xml or application/xml: an XML representation
- text/plain: a textual representation of your entity
Content negotiation (the HTTP Accept header) can be used to indicate your preferred representation.
In case you can't set the Accept header, you can work around this by specifying it in the URI, for example ?media=json
Entities that are serializable, can also be retrieved as serialized Java objects.
For POST/PUT operations, the payload can be JSON, XML or serialized Java objects.
Previous