tags:

views:

12

answers:

0

I am implementing jersey restful web service to get application/json mime type from the java bean classes. Given below is the resource class code @GET @Produces({"application/json"}) public synchronized Flights getFlightList() { return myFlights; } Here if the return object (Flight) converts to json object only when the Flight encoding with jaxb. For normal POJO classes it not returning anything instead of Http error”500” is coming.

Can you please tell me is it possible to send normal java bean object as json format? If yes what are the procedures to follow to achieve the same?