/** * Quotes string contents using standard JSON quoting. */ public static String quoteAsJsonString(String s) { return new String(JsonStringEncoder.getInstance().quoteAsString(s)); }
public static char[] jsonEncoding(String rawString) { return JsonStringEncoder.getInstance().quoteAsString(rawString); }
public static String escape(String text) { return new String(JsonStringEncoder.getInstance().quoteAsUTF8(text)); }