Class LicenseCheckerJsonUtil

java.lang.Object
com.vaadin.pro.licensechecker.json.impl.LicenseCheckerJsonUtil

public class LicenseCheckerJsonUtil extends Object
Direct port of json2.js at http://www.json.org/json2.js to GWT.
  • Constructor Details

    • LicenseCheckerJsonUtil

      public LicenseCheckerJsonUtil()
  • Method Details

    • escapeControlChars

      public static String escapeControlChars(String text)
      Convert special control characters into unicode escape format.
    • parse

      public static <T extends LicenseCheckerJsonValue> T parse(String json) throws LicenseCheckerJsonException
      Throws:
      LicenseCheckerJsonException
    • quote

      public static String quote(String value)
      Safely escape an arbitrary string as a JSON string literal.
    • stringify

      public static String stringify(LicenseCheckerJsonValue jsonValue)
      Converts a LicenseCheckerJson Object to LicenseCheckerJson format.
      Parameters:
      jsonValue - json object to stringify
      Returns:
      json formatted string
    • stringify

      public static String stringify(LicenseCheckerJsonValue jsonValue, int spaces)
      Converts a JSO to LicenseCheckerJson format.
      Parameters:
      jsonValue - json object to stringify
      spaces - number of spaces to indent in pretty print mode
      Returns:
      json formatted string
    • stringify

      public static String stringify(LicenseCheckerJsonValue jsonValue, String indent)
      Converts a LicenseCheckerJson object to LicenseCheckerJson formatted String.
      Parameters:
      jsonValue - json object to stringify
      indent - optional indention prefix for pretty printing
      Returns:
      json formatted string