Class JSONUtil

java.lang.Object
de.ralleytn.simple.json.JSONUtil

public final class JSONUtil extends Object
Contains some utility methods for JSON related stuff.
Since:
2.0.0
Version:
2.0.0
Author:
Ralph Niemitz/RalleYTN(ralph.niemitz@gmx.de)
  • Method Details

    • escape

      public static final String escape(String string)
      Escape quotes, \, /, \r, \n, \b, \f, \t and other control characters (U+0000 through U+001F).
      Parameters:
      string - the String you want to escape
      Returns:
      the escaped String
      Since:
      1.0.0
    • isJSONType

      public static final boolean isJSONType(Object value)
      Checks if a value is a JSON compatible type.
      Parameters:
      value - the value that should be checked
      Returns:
      true if the given value is a JSON compatible type, else false
      Since:
      2.0.0