This example demonstrates how to produce/consume JSON representations from Java objects.
The mapping of the URI path space is presented in the following table:
URI path | Resource class | HTTP method |
---|---|---|
/test | JsonResource | GET |
/test | JsonResource | POST |
(See JsonResourceTest for more details.)
Run the example as follows:
mvn clean compile exec:java
This deploys the example using Grizzly
A WADL description may be accessed at the URL:
The resource is available at