i have a restcontroller with following Code
@RequestMapping(method = RequestMethod.POST, value = "/student") public void addTopic(@RequestBody Student student) { student.setPassword(bCryptPasswordEncoder.encode(student.getPassword())); studentService.addStudent(student); } but if the json data doesn't match the Student object, or is wrong formatted an com.fasterxml.jackson.core.JsonParseException: Unexpected character ('"' (code 34)) ist thrown.
what is the best practice to prevent that