createObjectMapper

fun createObjectMapper(): ObjectMapper

Creates and configures an instance of ObjectMapper with specific settings.

Settings include:

  • Inclusion of the JavaTimeModule to handle Java 8 Date and Time API.

  • Disabling of certain deserialization and serialization features to manage date formats and unknown properties.

  • Configuration to only include non-null values in serialization.

  • Registration of the Kotlin module to support Kotlin-specific features.

Return

a configured instance of ObjectMapper.