I'm using Jersey to develop my restful services and had a few questions.
Lets say I have an implementation of my service as below,
@UriTemplate("/myresource/")
public class MyResource {
@HttpMethod
@ProduceMime({"application/xml", "application/json"})
public JAXBBean get() {
JAXBBean j = ...
return j;
}
}
1. What do I need to do (which URI to invoke) in my client if I want to get
the result in JSON format.
2. If I just use the URI
http://mydomain/myresource/, then xml would be returned by default.
How do I make JSON data to be returned as default?
Thanks
Manveen