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 methods |
---|---|---|
/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:
http://localhost:9998/jsonmoxy/application.wadl
The resource is available at
http://localhost:9998/jsonmoxy/test