Moxy ignore invalid fields in json
When I send this request: {"invalidField": "value", "date": "value"} to my rest service: @PUT @Consumes("application/json") public void putJson(Test content) { System.out.println(content.toString()); } I expected to get an exception because: There is no invalidField in my domain model. Date format is not valid. But really I get test object with null values. My dmain model is: public class Test { private String name; private Date date; //getters and setters here } I think this is not a valid behavior. How can I fix that? Thanks for help. Solution: As Blaise Doughan said, it is required to