获取字符串类型值，并转义不可见字符，如'\n'换行符会被转义为字符串"\n"

@param key 键
@param defaultValue 默认值
@return 字符串类型值
@since 4.2.2
972977
public String getStrEscaped(K key, String defaultValue) {
		return JSONUtil.escape(getStr(key, defaultValue));
	}
104065
public org.tensorflow.framework.SignatureDef getSignatureDefOrDefault(
      java.lang.String key,
      org.tensorflow.framework.SignatureDef defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, org.tensorflow.framework.SignatureDef> map =
        internalGetSignatureDef().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
834492
public static Object findMapValueByKey(Object key, Map<?, ?> map,
	Object defaultValue)
	{
		if (key == null || map == null)
			return defaultValue;

		Object value = map.get(key);

		if (value == null)
			return defaultValue;

		return value;
	}
628350
public static <K, V> V getOrDefault(final Map<K, V> map, final Object key, final V defaultValue) {
        if (N.isNullOrEmpty(map)) {
            return defaultValue;
        }

        final V val = map.get(key);

        if (val != null || map.containsKey(key)) {
            return val;
        } else {
            return defaultValue;
        }
    }
766264
public static String getStringValue(Object newValue, String defaultValue) {
        if (newValue == null)
            return defaultValue;

        return (String) newValue;
    }
938440
protected static <T> IKey<T> newKey(final String key, final T defaultValue) {
        return new Key<T>(key, defaultValue);
    }
35033
public String getText(String key, String defaultValue, Object... args) {
    String text = doGetText(key);
    if (null == text) text = (null == defaultValue && keyAsDefault) ? key : defaultValue;
    if (null != text && args.length > 0) return formater.format(text, locale, args);
    return text;
  }
1066509
public String getString(String key, String defaultValue) {
		Object o = getObject(key);
		if (o == null) {
			return defaultValue;
		}
		if (!(o instanceof String)) {
			throw new IllegalArgumentException("Object ["+o+"] associated with key ["+key+"] is not of type String.");
		}
		return (String)o;
	}
1258512
public org.tensorflow.framework.AttrValue getAttrOrDefault(
      java.lang.String key,
      org.tensorflow.framework.AttrValue defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, org.tensorflow.framework.AttrValue> map =
        internalGetAttr().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
966835
public String getProperty(String key,String defaultValue)
    {
        //get property value
        return this.PROPERTIES.getProperty(key,defaultValue);
    }
736921
public int getProperty(String key, int defaultValue) {
        String value = getProperty(key, String.class);
        return StringUtils.isEmpty(value) ? defaultValue : Integer.parseInt(value);
    }
304506
function(key, defaultValue){
    var c = getCache(this.ns)

    if(arguments.length === 0) {
      return c
    }

    return c[key] !== undefined ? c[key] : defaultValue
  }
478337
public String getString(Enum<?> key, String defaultValue)
    {
        if (key == null)
        {
            return defaultValue;
        }

        return getString(key.name(), defaultValue);
    }
573770
@Override
    public final String optString(final String key, final String defaultValue) {
        String result = optString(key);
        return result == null ? defaultValue : result;
    }
1163869
private String getValueOrDefault(HttpServletRequest req, String paramName, String defaultValue) {
		final String value = req.getParameter(paramName);
		return StringUtils.isEmpty(value) ? defaultValue : value;
	}
744270
static String valueAsString(Map<String, Object> map, Key key, String defaultValue) {
        Validate.notNullOrEmpty(key.key, "Key for plugin configuration must be set");
        if (map.containsKey(key.key)) {
            return map.get(key.key).toString().length() == 0 ? defaultValue : map.get(key.key).toString();
        }
        return defaultValue;
    }
701255
public <T> T get(String key, T defaultValue) {
        if (map.containsKey(key)) {
            Object value = map.get(key);
            return (T)(value instanceof byte[] ? unmarshall((byte[])value) : value);
        }
        return defaultValue;
    }