code: static ObjectMapper getMapper() {
          ObjectMapper mapper = new ObjectMapper();
  
          // do not write null values
          mapper.setSerializationInclusion(Include.NON_NULL);
  
          mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE);
          mapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
  
          // set Date objects to output in readable customized format
          mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
          DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
          mapper.setDateFormat(dateFormat);
  
          return mapper;
      }
docs: Return the internal ObjectMapper
  @return an Objectmapper