I am implementing jersey restful web service to get JSON Object directly. For it i will pass a String (in Json format). Given below is the structure of class code i want to implement.
@POST
@Produces(MediaType.APPLICATION_JSON)
@Consumes({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})
public JSON putToJson(JSON todo)
{
//*********
return todo;
}
Please insist me how can i directly inject the JSON string into JSON object directly.
Thanks in advance…….
As per my understanding for your question:
Below code will inject the JSON string into JSONObject directly and you can access to that object