Package africa.absa.inception.api
Class ApiUtil
- java.lang.Object
-
- africa.absa.inception.api.ApiUtil
-
public class ApiUtil extends Object
The RestUtil class provides utility methods that are useful when working with APIs implemented as RESTful web services.- Author:
- Marcus Portmann
-
-
Constructor Summary
Constructors Constructor Description ApiUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringquote(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 </, producing <\/, 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
-
-