Code example for JsonParseException

0
			if( value == 0)
				return false; 
			else if( value == 1 )
				return true; 
			else 
				throw new JsonParseException("Boolean value " + value + " not valid");
					 
		}catch(NumberFormatException nfe){
			String value = arg0.getAsString();
			if(value.toLowerCase().equals("true"))
				return true; 
			else if( value.toLowerCase().equals("false") )
				return false; 
			else 
				throw new JsonParseException("Boolean value " + value + " not valid");							
		}			 
	} 
		 
}