Code example for JSONObject

Methods: getString, has, isNull

0
	 *   IOException if there is any IO errors while parsing 
	 */ 
	private static DbusKeyFilter getDbusKeyFilter(JSONObject obj, ObjectMapper mapper)
	  throws JSONException, IOException 
	{ 
		  String type = obj.getString(partitionTypeFieldName);
		  JSONArray array = null;
 
		  DbusKeyFilter configHolder = new DbusKeyFilter();
		  configHolder.setPartitionType(PartitionType.valueOf(type));
 
		  if (! obj.has(filterConfigFieldName) || obj.isNull(filterConfigFieldName))
		  { 
			  return configHolder;
		  } 
 
		  array = obj.getJSONArray(filterConfigFieldName);
 
		  ArrayList<DbusFilter> filters = new ArrayList<DbusFilter>();
 
		  for ( int i = 0; i < array.length(); i++)