public class WebUtils extends Object
Modifier and Type | Method | Description |
---|---|---|
static WebHijackPreventionStrategy |
getWebHijackPreventionStrategy() |
Returns the configured WebHijackPreventionStrategy.
|
static String |
protect(JSON json) |
Transforms the input Json string using the configured
WebHijackPreventionStrategy.
|
static String |
protect(JSON json,
boolean shrink) |
Transforms the input Json string using the configured
WebHijackPreventionStrategy.
|
static void |
setWebHijackPreventionStrategy(WebHijackPreventionStrategy strategy) |
Sets a WebHijackPreventionStrategy.
Will use default value (WebHijackPreventionStrategy.INFINITE_LOOP) if null. |
static String |
toString(JSON json) |
Returns a string represenation of a JSON value.
When an object property name does not contain a space (' ') or a colon (':'), the quotes are omitted. |
public static WebHijackPreventionStrategy getWebHijackPreventionStrategy()
public static String protect(JSON json)
json
- the input stringpublic static String protect(JSON json, boolean shrink)
json
- the input stringshrink
- if redundant key quotes may be eliminated.public static void setWebHijackPreventionStrategy(WebHijackPreventionStrategy strategy)
Copyright © 2006–2019 Json-lib. All rights reserved.