Class LicenseCheckerJsonUtil
java.lang.Object
com.vaadin.pro.licensechecker.json.impl.LicenseCheckerJsonUtil
Direct port of json2.js at http://www.json.org/json2.js to GWT.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringescapeControlChars(String text) Convert special control characters into unicode escape format.static <T extends LicenseCheckerJsonValue>
Tstatic StringSafely escape an arbitrary string as a JSON string literal.static Stringstringify(LicenseCheckerJsonValue jsonValue) Converts a LicenseCheckerJson Object to LicenseCheckerJson format.static Stringstringify(LicenseCheckerJsonValue jsonValue, int spaces) Converts a JSO to LicenseCheckerJson format.static Stringstringify(LicenseCheckerJsonValue jsonValue, String indent) Converts a LicenseCheckerJson object to LicenseCheckerJson formatted String.
-
Constructor Details
-
LicenseCheckerJsonUtil
public LicenseCheckerJsonUtil()
-
-
Method Details
-
escapeControlChars
Convert special control characters into unicode escape format. -
parse
public static <T extends LicenseCheckerJsonValue> T parse(String json) throws LicenseCheckerJsonException - Throws:
LicenseCheckerJsonException
-
quote
Safely escape an arbitrary string as a JSON string literal. -
stringify
Converts a LicenseCheckerJson Object to LicenseCheckerJson format.- Parameters:
jsonValue- json object to stringify- Returns:
- json formatted string
-
stringify
Converts a JSO to LicenseCheckerJson format.- Parameters:
jsonValue- json object to stringifyspaces- number of spaces to indent in pretty print mode- Returns:
- json formatted string
-
stringify
Converts a LicenseCheckerJson object to LicenseCheckerJson formatted String.- Parameters:
jsonValue- json object to stringifyindent- optional indention prefix for pretty printing- Returns:
- json formatted string
-