Class JsonEscapeUtils
- java.lang.Object
-
- com.atlassian.confluence.json.json.JsonEscapeUtils
-
public class JsonEscapeUtils extends Object
- Since:
- 5.4
-
-
Constructor Summary
Constructors Constructor Description JsonEscapeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
quote(String string)
Produce a string in double quotes with backslash sequences in all the right places.
-
-
-
Method Detail
-
quote
public static String quote(String string)
Produce a string in double quotes with backslash sequences in all the right places. A backslash will be inserted within </, allowing JSON text to be delivered in HTML. In JSON text, a string cannot contain a control character or an unescaped quote or backslash.- Parameters:
string
- A String- Returns:
- A String correctly formatted for insertion in a JSON text.
-
-