@Override
    public T merge(final T baseEntity, final T childEntity) {
        return FunctionUtils.doUnchecked(() -> {
            val reader = getObjectMapper().readerForUpdating(baseEntity);
            return reader.readValue(toString(childEntity));
        });
    }
Generic class to serialize objects to/from JSON based on jackson.

@author Misagh Moayyed
@param <T> the type parameter
@since 4.1
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/serialization/BaseJacksonSerializer.java