public ObjectMapper getObjectMapper() {
        if (objectMapper == null) {
            objectMapper = JacksonObjectMapperFactory
                .builder()
                .defaultTypingEnabled(isDefaultTypingEnabled())
                .jsonFactory(getJsonFactory())
                .applicationContext(applicationContext)
                .build()
                .toObjectMapper();
            configureObjectMapper(objectMapper);
        }
        return objectMapper;
    }
Gets object mapper and builds on if uninitialized.

@return the object mapper
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/serialization/BaseJacksonSerializer.java