Code example for JSONObject

Methods: getInt

0
    } 
  } 
   
  private static int failSafeGetIntFromJSON(JSONObject json, String name, int defaultValue) {
    try { 
      return json.getInt(name);
    } 
    catch (JSONException e) {
      return defaultValue;
    } 
  } 
 
  public long getItemId(int position) {
    return new Integer(position).hashCode();
  } 
 
  public View getView(int position, View convertView, ViewGroup parent) {
    switch (position % 2) {
    case 0: 
      return getSimpleView(position, convertView, parent);
    case 1: