If you dontdon't want to have a setter in your bean and only use fields and getters, you can use the visibility checker of ObjectMapperObjectMapper to allow field visibility. Something
Something like following:
ObjectMapper mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); mapper.setVisibilityCheckersetVisibility(VisibilityChecker.Std.defaultInstance().withFieldVisibility(JsonAutoDetect.Visibility.ANY));