public class WebUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static WebHijackPreventionStrategy |
getWebHijackPreventionStrategy()
Returns the configured WebHijackPreventionStrategy.
|
static java.lang.String |
protect(JSON json)
Transforms the input Json string using the configured
WebHijackPreventionStrategy.
|
static java.lang.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 java.lang.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 java.lang.String protect(JSON json)
json
- the input stringpublic static java.lang.String protect(JSON json, boolean shrink)
json
- the input stringshrink
- if redundant key quotes may be eliminated.public static void setWebHijackPreventionStrategy(WebHijackPreventionStrategy strategy)
public static java.lang.String toString(JSON json)
Copyright © 2006-2013 Json-lib. All Rights Reserved.