Class EscapeUtils


  • public class EscapeUtils
    extends Object
    • Constructor Detail

      • EscapeUtils

        public EscapeUtils()
    • 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 as escapeJson() does
        Parameters:
        text -
        Returns:
      • escapeRaw

        public static String escapeRaw​(String text,
                                       com.fasterxml.jackson.core.util.DefaultPrettyPrinter prettyPrinter)
      • escapeJsonOrRaw

        public static String escapeJsonOrRaw​(String text)
      • escapeJsonOrRaw

        public static String escapeJsonOrRaw​(String text,
                                             com.fasterxml.jackson.core.util.DefaultPrettyPrinter prettyPrinter)