public String encode(@CheckForNull String toEncode) {
        if (toEncode == null) {
            return null;
        }
        return toEncode.replace(enclosedBy, escapeEnclosedBy);
    }
Encodes String so that it can be safely represented in the YAML after export.
@param toEncode String to encode
@return Encoded string
@since 1.25
plugin/src/main/java/io/jenkins/plugins/casc/SecretSourceResolver.java