Class StringEscapeUtils


  • public final class StringEscapeUtils
    extends java.lang.Object
    Utilities for escaping String.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String escapeJson​(java.lang.String string)
      Modified from the quote method in: https://github.com/codehaus/jettison/blob/master/src/main/java/org/codehaus/jettison/json/JSONObject.java
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • escapeJson

        public static java.lang.String escapeJson​(@Nullable
                                                  java.lang.String string)
        Modified from the quote method in: https://github.com/codehaus/jettison/blob/master/src/main/java/org/codehaus/jettison/json/JSONObject.java
        Parameters:
        string - The string to escape.
        Returns:
        An escaped JSON string.