Code example for JSONObject

Methods: getBoolean, getLong, has

0
    	// 
    	// "generatorParameters": { 
 		//     "printDebugToTraceLog": "true", 
    	// }, 
  	 
    	if( config.has( CFG_DEBUG_TO_TRACE_LOG_KEY ) )
    		printDebugToTraceLog = config.getBoolean( "printDebugToTraceLog" );
        //System.out.println("** printDebugToTrace is: " + printDebugToTraceLog); 
 
    	// If a seed for the random number generator is passed in then use it 
    	if( config.has( CFG_RNG_SEED_KEY ) )
    		this._randomNumberGenerator = new java.util.Random( config.getLong( CFG_RNG_SEED_KEY ) );
    	else this._randomNumberGenerator = new java.util.Random();
    	 
    	if( config.has(CFG_USE_POOLING_KEY) )
			this._usePooling = config.getBoolean( CFG_USE_POOLING_KEY );
		 
    	 
    	// JSON objects can be strings, long, etc. 
    	//String paramOne = config.getString( "paramOne" ); 
        //long paramTwo = config.getLong( "paramTwo" );