Monthly Archives: July 2013

FAQ: RESTful web service with Jersey&Jackson

How to do output in JSON format Server:  @POST @Path("{id}") @Produces("application/json")   @Consumes("application/json")   public JSONObject sayPlainTextHello(@PathParam("id")JSONObject inputJsonObj) {   String input = (String) inputJsonObj.get("input");   String output="The input you sent is :"+input;   JSONObject outputJsonObj = new JSONObject();   … Continue reading

Posted in Java | Leave a comment