/** * Construct a TimeZoneData javascript overlay object given some json text. * This method directly evaluates the String that you pass in; no error or * safety checking is performed, so be very careful about the source of * your data. * * @param json JSON text describing a time zone, like what comes from * {@link com.google.gwt.i18n.client.constants.TimeZoneConstants}. * @return a TimeZoneInfo object made from the supplied JSON. */ public static TimeZoneInfo buildTimeZoneData(String json) { return JsonUtils.safeEval(json); }
sb.append(JsonUtils.escapeValue(asString())); return; sb.append(JsonUtils.escapeValue(key)); sb.append(":"); value.stringifySlow(sb);
protected <T extends JavaScriptObject> T eval(String response) { return USE_SAFE_EVAL ? JsonUtils.<T>safeEval(response) : JsonUtils.<T>unsafeEval(response); }
@Override public Properties parseJSON(String json) { return JsonUtils.unsafeEval(json); }
private static JavaScriptObject getEscapeTable() { if (escapeTable == null) { escapeTable = initEscapeTable(); } return escapeTable; }
public static String getBeautifulText( String searchString ) { GenericJSO jso = null; try { jso = JsonUtils.unsafeEval( searchString ); } catch( Exception e ) { } if( jso == null ) return null; return getBeautifulText( jso ); }
private static JavaScriptObject getEscapeTable() { if (escapeTable == null) { escapeTable = initEscapeTable(); } return escapeTable; }
/** * Takes in a trusted JSON String and evals it. * * @param jsonString JSON string that you trust. * @return JavaScriptObject that you can cast to an Overlay Type */ public static JavaScriptObject eval(String jsonString) { return JsonUtils.safeEval(jsonString); }
protected <T extends JavaScriptObject> T eval(String response) { return USE_SAFE_EVAL ? JsonUtils.<T>safeEval(response) : JsonUtils.<T>unsafeEval(response); }
public String getPayload() { if (isString()) { return JsonUtils.escapeValue(asString()); } if (stringifyFastSupported()) { return stringifyFast(); } return stringifySlow(); }
public static String getBeautifulText( String searchString ) { GenericJSO jso = null; try { jso = JsonUtils.unsafeEval( searchString ); } catch( Exception e ) { } if( jso == null ) return null; return getBeautifulText( jso ); }
private static JavaScriptObject getEscapeTable() { if (escapeTable == null) { escapeTable = initEscapeTable(); } return escapeTable; }
/** * Construct a TimeZoneData javascript overlay object given some json text. * This method directly evaluates the String that you pass in; no error or * safety checking is performed, so be very careful about the source of * your data. * * @param json JSON text describing a time zone, like what comes from * {@link com.google.gwt.i18n.client.constants.TimeZoneConstants}. * @return a TimeZoneInfo object made from the supplied JSON. */ public static TimeZoneInfo buildTimeZoneData(String json) { return JsonUtils.safeEval(json); }
/** * Performs evaluation of serialized response obeying the #useSafeEval configuration. * <p/> * * If #useSafeEval is {@code true} then the eval is performed using {@link JsonUtils#safeEval}, * otherwise then content will be loosely evaluated by {@link JsonUtils#unsafeEval}. * * @param response The serialized content * * @return The converted JavaScriptObject */ protected JavaScriptObject eval(String response) { return useSafeEval() ? JsonUtils.safeEval(response) : JsonUtils.unsafeEval(response); } }
/** * Returns the JSON formatted value of this string, quoted for evaluating in a * JavaScript interpreter. */ @Override public String toString() { return JsonUtils.escapeValue(value); }
jso = JsonUtils.unsafeEval( receivedTxt ).cast();
/** * Construct a TimeZoneData javascript overlay object given some json text. * This method directly evaluates the String that you pass in; no error or * safety checking is performed, so be very careful about the source of * your data. * * @param json JSON text describing a time zone, like what comes from * {@link com.google.gwt.i18n.client.constants.TimeZoneConstants}. * @return a TimeZoneInfo object made from the supplied JSON. */ public static TimeZoneInfo buildTimeZoneData(String json) { return JsonUtils.safeEval(json); }
/** * Performs evaluation of serialized response obeying the #useSafeEval configuration. * <p/> * * If #useSafeEval is {@code true} then the eval is performed using {@link JsonUtils#safeEval}, * otherwise then content will be loosely evaluated by {@link JsonUtils#unsafeEval}. * * @param response The serialized content * * @return The converted JavaScriptObject */ protected JavaScriptObject eval(String response) { return useSafeEval() ? JsonUtils.safeEval(response) : JsonUtils.unsafeEval(response); } }
/** * Returns the JSON formatted value of this string, quoted for evaluating in a * JavaScript interpreter. */ @Override public String toString() { return JsonUtils.escapeValue(value); }
jso = JsonUtils.unsafeEval( receivedTxt ).cast();