Java Code Examples for org.apache.commons.text.StringEscapeUtils#unescapeJson()

The following examples show how to use org.apache.commons.text.StringEscapeUtils#unescapeJson() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ComparisonBuilder.java    From spring-cloud-contract with Apache License 2.0 4 votes vote down vote up
default String convertUnicodeEscapesIfRequired(String json) {
	String unescapedJson = StringEscapeUtils.unescapeJson(json);
	return escapeJava(unescapedJson);
}
 
Example 2
Source File: JsonUnescapeTransformer.java    From LoggerPlusPlus with GNU Affero General Public License v3.0 4 votes vote down vote up
@Override
public String transform(String string) {
    return StringEscapeUtils.unescapeJson(string);
}
 
Example 3
Source File: JsonUtility.java    From jstarcraft-core with Apache License 2.0 2 votes vote down vote up
/**
 * 对字符串执行JSON解密
 * 
 * @param string
 * @return
 */
public static final String unescapeJson(String string) {
    return StringEscapeUtils.unescapeJson(string);
}