In my service I want to use JSONObject
class to create a JSON object. For that I imported the package org.codehaus.jettison.json
and saved it, but when I run the project I get this error:
error: package org.codehaus.jettison.json does not exist
[javac] import org.codehaus.jettison.json.JSONException;*
Here is my code
@POST
@Path("/RSJson")
@Consumes({ MediaType.APPLICATION_JSON })
@Produces(MediaType.APPLICATION_JSON)
public Response RSJson(JSONObject jsonobj) {
System.out.println("Insert "+jsonobj);
return Response.status(Status.OK.getStatusCode()).entity(jsonobj)
.build();
}