|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.json.util.WebUtils
public class WebUtils
Provides useful methods for working with JSON and web.
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static WebHijackPreventionStrategy getWebHijackPreventionStrategy()
public static String protect(JSON json)
json
- the input string
public static 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 String toString(JSON json)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |