code: public static final <T> void addSerializer(SimpleModule module, Class<T> type,
  			CheckedBiConsumer<T, JsonGenerator> consumer) {
  		module.addSerializer(type, new JsonSerializer<T>() {
  
  			@Override
  			public final void serialize(T value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
  				consumer.accept(value, gen);
  			}
  
  		});
  	}
docs: --- ADD CUSTOM SERIALIZER ---