I am using an http Post request with JSON to get request to my webservice. My problem is i want the JSON parameters to be case insensitive so that user can enter the parameters either in upper or lower case.
Is there any way to achieve this rather then using different setters for all paramters like in this link Case insensitive JSON to POJO mapping without changing the POJO
Here is my sample pojo:
public class SamplePojo implements Serializable
{
String name;
String mobileNo;
String address;
}
Here is my web service
@RequestMapping(value = "/send",
method = RequestMethod.POST,
consumes = MediaType.APPLICATION_JSON_VALUE)
public @ResponseBody String trackSMSPost (@RequestBody SamplePojo sample)
{
process(sample);
return "true";
}
Is there a way to get the request to the webservice even if parameter names are all uppercase or lowercase or camelcase.