app/src/main/java/org/andstatus/app/util/JsonUtils.java
/** Return the value mapped by the given key, or fallback if not present */
Return the value mapped by the given key, or fallback if not present
Return the value mapped by the given key or fallback if not present
public static String optString(@NonNull JSONObject json, @NonNull String key, String fallback) {
        if (json.isNull(key))
            return fallback;
        else
            return json.optString(key, fallback);
    }
public static String optString ( @ NonNull JSONObject json , @ NonNull String key , String fallback ) { if ( json . isNull ( key ) ) return fallback ; else return json . optString ( key , fallback ) ; }
Return the value mapped by the given key, or fallback if not present
Return the value mapped by the given key or fallback if not present
// http://code.google.com/p/android/issues/detail?id=13830