public static void export(final File destination, final Object data) {
        FunctionUtils.doUnchecked(__ -> {
            val mapper = new ObjectMapper(new YAMLFactory())
                .setSerializationInclusion(JsonInclude.Include.NON_DEFAULT)
                .configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false)
                .configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true)
                .configure(SerializationFeature.INDENT_OUTPUT, true);
            mapper.writeValue(destination, data);
        });
    }
Export.

@param destination the destination
@param data        the data
support/cas-server-support-configuration-metadata-repository/src/main/java/org/apereo/cas/metadata/CasConfigurationMetadataCatalog.java