Class EscapeUtils
- java.lang.Object
-
- org.pentaho.platform.web.http.api.resources.utils.EscapeUtils
-
public class EscapeUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description EscapeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
escapeJson(String text)
Escapes Strings in a JSON structurestatic String
escapeJson(String text, com.fasterxml.jackson.core.util.DefaultPrettyPrinter prettyPrinter)
static String
escapeJsonOrRaw(String text)
static String
escapeJsonOrRaw(String text, com.fasterxml.jackson.core.util.DefaultPrettyPrinter prettyPrinter)
static String
escapeRaw(String text)
Escapes any text using the same rules asescapeJson() does
static String
escapeRaw(String text, com.fasterxml.jackson.core.util.DefaultPrettyPrinter prettyPrinter)
-
-
-
Method Detail
-
escapeJson
public static String escapeJson(String text) throws IOException
Escapes Strings in a JSON structure- Parameters:
text
-- Returns:
- Throws:
IOException
- if failed (when text is not not JSON)
-
escapeJson
public static String escapeJson(String text, com.fasterxml.jackson.core.util.DefaultPrettyPrinter prettyPrinter) throws IOException
- Throws:
IOException
-
escapeRaw
public static String escapeRaw(String text)
Escapes any text using the same rules asescapeJson() does
- Parameters:
text
-- Returns:
-
escapeRaw
public static String escapeRaw(String text, com.fasterxml.jackson.core.util.DefaultPrettyPrinter prettyPrinter)
-
-