public static String optString ( JSONObject json , String name , String fallback ) { if ( json . isNull ( name ) ) { return fallback ; } else { return json . optString ( name , fallback ) ; } }
Returns the value mapped by name if it exists coercing it if necessary or fallback if no such mapping exists .