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 -
Method Summary
Modifier and TypeMethodDescriptionvoidcustomize(com.fasterxml.jackson.databind.ObjectMapper mapper) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
customizein interfaceio.quarkus.jackson.ObjectMapperCustomizer
-