Hi,
my following function in Resource file can produce result correctly in xml but not JSON.
@GET
@Path("/{id}/companies")
@Produces({ "application/xml", "application/json" })
public JResponse<List<hk.itags.restclient.Company>> getCompanies(
@PathParam(value = "id") long id) {
List<hk.itags.restclient.Company> comlist = null; .... return JResponse.ok(comlist).build(); }
I thought JAXB can produce both xml and json output. what is the problem?
Regards,
Brendan