code: private void setNewObjectMapper() {
          mapper = new ObjectMapper();
          if (!serializeNullValues) {
              mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
              if (ignoreUnknownProperties) {
                  mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
              }
          }
      }
docs: Sets a new object mapper, taking into account the original configuration parameters.