Paul,
So the below code is the way you go about unmarshalling JSON using JAXB? I couldn't find much documentation about this...
Ronak
________________________________
From: Paul Sandoz <Paul.Sandoz@Sun.COM>
To: users@jersey.dev.java.net
Sent: Friday, May 29, 2009 2:42:21 PM
Subject: Re: [Jersey] Consume JSON REST Web Services using Jersey
Hi Ronak,
You can use JAXB if you wish, but you can also use other types like JSONObject or JSONArray.
Or you could use the support provided by Jackson:
http://jackson.codehaus.org/Download
It really depends on how you want to process the JSON.
Paul.
On May 29, 2009, at 2:28 PM, Ronak Patel wrote:
All,
How can I use Jersey to consume JSON REST Web Services?
Can the below code be used to consume JSON services? Is the Entity supposed to be a JAXB annotated bean?
final WebResource resource = Client.create().resource("
http://localhost/serviceurl");
final Builder resourceBuilder = resource.queryParams(queryParams).accept(MediaType.APPLICATION_JSON_TYPE);
final ClientResponse response = resourceBuilder.get(ClientResponse.class);
response.getEntity(...);
Ronak