So, I have a json object which I need to de-serialize to a POJO, make some changes to its fields then send that POJO through a controller to the front end. The json that I receive as a response to that controller has a lot of fields that are null as they did not exist in the json that was deserialized. I want the jackson library to not include any fields that have a null value.
The challenge I am facing is that I cannot add that @JsonInclude annotation to the Object class that I am trying to deserialize as the model class has been imported from a library and therefore the file is a readonly file. Is there a different way of configuring the default jackson settings for the project to not include these null values? Is there a default object mapper that can be configured?