I am trying to implement put service where i will get a JSON as request, update the JAXB object and perform update in the database. Can you please suggest me how to validate the incoming JSON for its structure before performing the update.
@PUT
@Consumes(MediaType.APPLICATION_XML)
public Response updatePerson(JAXBElement<Person> person) {
// JSON VALIDATION HERE
Person p = person.getValue();
//update to the database
...
}
Thanks
Viraj
--
View this message in context: http://jersey.576304.n2.nabble.com/Validating-the-JSON-for-put-service-tp6412109p6412109.html
Sent from the Jersey mailing list archive at Nabble.com.