Class SdkObjectMapperCustomizer

java.lang.Object
ai.timefold.solver.service.jackson.impl.SdkObjectMapperCustomizer
All Implemented Interfaces:
io.quarkus.jackson.ObjectMapperCustomizer, Comparable<io.quarkus.jackson.ObjectMapperCustomizer>

@Singleton public class SdkObjectMapperCustomizer extends Object implements io.quarkus.jackson.ObjectMapperCustomizer
Customizes the Jackson ObjectMapper with the defaults used by the SDK:
  • Enables failing on unknown properties.
  • Serialize only non-null properties by default JsonInclude.Include.NON_NULL.
  • Serialize datetime and duration objects as strings, rather than numeric timestamps.
  • Prevents adjusting the time zone offset values to the context time zone when serializing/deserializing.

Based on Quarkus Writing JSON REST services guide.

  • Field Summary

    Fields inherited from interface io.quarkus.jackson.ObjectMapperCustomizer

    DEFAULT_PRIORITY, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, QUARKUS_CUSTOMIZER_PRIORITY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    customize(com.fasterxml.jackson.databind.ObjectMapper mapper)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.quarkus.jackson.ObjectMapperCustomizer

    compareTo, priority
  • Constructor Details

    • SdkObjectMapperCustomizer

      public SdkObjectMapperCustomizer()
  • Method Details

    • customize

      public void customize(com.fasterxml.jackson.databind.ObjectMapper mapper)
      Specified by:
      customize in interface io.quarkus.jackson.ObjectMapperCustomizer